[claude] add testkit coverage for relay moderation endpoints (#39) #62

Merged
Rockachopa merged 1 commits from claude/issue-39 into main 2026-03-23 14:51:22 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
e2b850e122 test: add testkit coverage for relay moderation endpoints (T41–T50)
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
Adds 10 new testkit tests covering the relay moderation shadow-queue
and admin relay management endpoints introduced by the moderation
feature:

- T41: GET /api/relay/policy health check
- T42: GET /api/admin/relay/stats field verification
- T43: GET /api/admin/relay/queue list structure
- T44: Invalid status filter → 400
- T45–T46: Approve/reject non-existent event → 404
- T47: Admin grant write access + verify in accounts list
- T48: Admin revoke access
- T49–T50: Input validation guards (invalid pubkey, invalid level)

Admin tests are gated on endpoint accessibility — they skip gracefully
when ADMIN_TOKEN is not set and localhost fallback is unavailable.

Refs #39

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:08:03 -04:00