test: add tests for EntitlementWebhookService #71

Open
Charon wants to merge 1 commit from feat/test-entitlement-webhook-service into dev
Member

Summary

  • Adds 48 tests (113 assertions) for EntitlementWebhookService
  • Covers webhook registration, unregistration, and update flows
  • Covers HMAC-SHA256 signature signing and verification
  • Covers async (job queue) and sync webhook dispatch
  • Covers test webhook delivery and retry logic
  • Covers circuit breaker behaviour (auto-disable after MAX_FAILURES, reset)
  • Covers SSRF protection (HTTP, localhost, private IPs, local domains, trusted domains)
  • Covers workspace-scoped queries and delivery history

Fixes #16

Test plan

  • All 48 tests pass locally (113 assertions)
  • Code style passes (Pint)
  • No new dependencies introduced
## Summary - Adds 48 tests (113 assertions) for `EntitlementWebhookService` - Covers webhook registration, unregistration, and update flows - Covers HMAC-SHA256 signature signing and verification - Covers async (job queue) and sync webhook dispatch - Covers test webhook delivery and retry logic - Covers circuit breaker behaviour (auto-disable after MAX_FAILURES, reset) - Covers SSRF protection (HTTP, localhost, private IPs, local domains, trusted domains) - Covers workspace-scoped queries and delivery history Fixes #16 ## Test plan - [x] All 48 tests pass locally (113 assertions) - [x] Code style passes (Pint) - [x] No new dependencies introduced
Charon added 1 commit 2026-03-24 13:42:40 +00:00
Adds 48 tests (113 assertions) covering webhook registration, dispatch,
signature verification, circuit breaker behaviour, retry logic,
SSRF protection, and workspace queries. Fixes #16.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/test-entitlement-webhook-service:feat/test-entitlement-webhook-service
git checkout feat/test-entitlement-webhook-service

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/test-entitlement-webhook-service
git checkout feat/test-entitlement-webhook-service
git rebase dev
git checkout dev
git merge --ff-only feat/test-entitlement-webhook-service
git checkout feat/test-entitlement-webhook-service
git rebase dev
git checkout dev
git merge --no-ff feat/test-entitlement-webhook-service
git checkout dev
git merge --squash feat/test-entitlement-webhook-service
git checkout dev
git merge --ff-only feat/test-entitlement-webhook-service
git checkout dev
git merge feat/test-entitlement-webhook-service
git push origin dev
Sign in to join this conversation.
No description provided.