Skip to content

test: cover api-key lifecycle and webhook crud#238

Open
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-43-apikey-webhook-tests
Open

test: cover api-key lifecycle and webhook crud#238
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-43-apikey-webhook-tests

Conversation

@pq198363-ops

Copy link
Copy Markdown

Summary

  • add regression coverage for API-key create/list/revoke lifecycle behavior
  • add webhook CRUD coverage for register/list/patch/test/delete flows and validation edges
  • return 400 invalid_request when webhook PATCH requests contain no mutable fields

Closes #43

Validation

  • npx prettier --check src/apikeys-webhooks.test.ts src/routes/webhooks.ts
  • npm run lint
  • clean dist, then npm run build
  • $env:NODE_ENV='test'; node --test dist/*.test.js dist/**/*.test.js (105 tests, 12 suites)
  • git diff --check

Notes

The new tests cover API-key secret non-disclosure on list responses, webhook URL length and scheme validation, empty/non-string event validation, unknown webhook cases, and the new empty PATCH rejection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test coverage for the API-key lifecycle and webhook CRUD endpoints

1 participant