Skip to content

test(backend): add integration coverage for the admin DLQ listing route - #1210

Open
badmusdare4 wants to merge 1 commit into
StellerCraft:mainfrom
badmusdare4:feat/issue-1163-engineer-integration-test-coverage-for-the
Open

test(backend): add integration coverage for the admin DLQ listing route#1210
badmusdare4 wants to merge 1 commit into
StellerCraft:mainfrom
badmusdare4:feat/issue-1163-engineer-integration-test-coverage-for-the

Conversation

@badmusdare4

Copy link
Copy Markdown

Overview

This PR adds integration test coverage for the Admin DLQ Listing Route (apps/backend/src/app/api/admin/webhooks/dlq/route.ts). It seeds representative DLQ entries across stripe and github sources and verifies the listing/read path — including pagination, filtering by source/status where supported, and the admin-authorization gate — in isolation from the existing replay-focused integration test.

Related Issue

Closes #

Changes

🧪 DLQ Listing Integration Test

  • [ADD] apps/backend/src/app/api/admin/webhooks/dlq/dlq-listing.integration.test.ts
    • Seeds DLQ entries across stripe and github sources.
    • Verifies the plain listing path returns all seeded entries with correct default pagination.
    • Covers supported filtering/pagination parameters (page, limit, source/status filters if supported by the route).
    • Verifies an unauthenticated/non-admin request is rejected with an authorization error.
    • Remains distinct from webhook-dlq-replay.integration.test.ts, which targets replay behavior.

✅ Test Command

npm run test --workspace=@craft/backend -- admin/webhooks/dlq

Verification Results

npm run test --workspace=@craft/backend -- admin/webhooks/dlq
✅ DLQ listing integration suite passes
✅ Listing endpoint returns seeded entries across stripe and github sources
✅ Pagination/filtering behavior verified
✅ Non-admin access rejected
Acceptance Criteria Status
Dedicated integration test exists for the admin DLQ listing route dlq-listing.integration.test.ts added
Seeds DLQ entries from both stripe and github sources ✅ Verified in listing response
Filtering/pagination parameters are covered ✅ Covered where supported by the route
Admin-authorization gate is covered ✅ Non-admin requests are rejected

Closes #1163

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@badmusdare4 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Engineer Integration Test Coverage for the Admin DLQ Listing Route

1 participant