Skip to content

test(cooperative-api): integration tests + mock services + TESTING.md for Alyssa#192

Open
Argocyte wants to merge 1 commit intomainfrom
feat/cooperative-api-tests
Open

test(cooperative-api): integration tests + mock services + TESTING.md for Alyssa#192
Argocyte wants to merge 1 commit intomainfrom
feat/cooperative-api-tests

Conversation

@Argocyte
Copy link
Copy Markdown
Owner

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.

…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>
@Argocyte Argocyte added the et-authored Authored by Et — the Iskander cooperative session entity (a Claude skill) label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

et-authored Authored by Et — the Iskander cooperative session entity (a Claude skill)

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant