test(cooperative-api): integration tests + mock services + TESTING.md for Alyssa#192
Open
test(cooperative-api): integration tests + mock services + TESTING.md for Alyssa#192
Conversation
…md, and env template Adds 5 new integration tests for the Iskander Cooperative API (the Python FastAPI service that upstream OpenClaw's Iskander-specific skills will call into — see Discussion #190 for the architectural relationship): - Health endpoint returns status ok - Mattermost webhook rejects invalid tokens (hmac.compare_digest) - Mattermost webhook rejects empty tokens - Bot loop prevention (messages from BOT_USER_ID return empty) - Loomio webhook rejects missing/invalid HMAC signatures - Rate limiting triggers after configurable threshold Also adds: - tests/mock_services.py: FastAPI app emulating Mattermost, Loomio, Decision Recorder, and provisioner APIs for local development - tests/env.test: environment template with all 9 required env vars pointing at mock services on port 9000 - TESTING.md: setup guide for Alyssa covering unit tests, local dev with mocks, and full-stack integration with upstream OpenClaw Total test count: 24 (15 existing + 5 new integration + 4 from existing meeting-prep and provisioning suites). All passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds 5 new integration tests, mock services for local dev, and TESTING.md setup guide. 24 tests passing total. See Discussion #190 for the architectural relationship (complementary layers: upstream OpenClaw Gateway + Iskander Cooperative API). @alyssaholland please review — this is directly addressing your testing difficulty from yesterday. The TESTING.md has step-by-step instructions for running the API locally with mock external services.