Skip to content

feat(contract): add comprehensive test coverage for cache, metrics, rate limit, and handlers - #1068

Open
zainabbaba31-source wants to merge 1 commit into
CodeGirlsInc:mainfrom
zainabbaba31-source:feature/contract-test-coverage
Open

feat(contract): add comprehensive test coverage for cache, metrics, rate limit, and handlers#1068
zainabbaba31-source wants to merge 1 commit into
CodeGirlsInc:mainfrom
zainabbaba31-source:feature/contract-test-coverage

Conversation

@zainabbaba31-source

@zainabbaba31-source zainabbaba31-source commented Jul 27, 2026

Copy link
Copy Markdown

This PR significantly increases test coverage for the contract service:

  • CT-42: Added 11 tests for the Redis cache module (set/get/delete/expire/flush/error handling)
  • CT-43: Added 8 tests for the metrics registry (request counting, cache hits/misses, error tracking, concurrent access, reset)
  • CT-44: Added 4 tests for the rate limiter (burst allowance, sustained rate limiting, multi-key isolation)
  • CT-45: Created handler integration tests with 9 tests covering health check, document verification, revocation, submission, and batch operations

Closes #1042
Closes #1043
Closes #1044
Closes #1045

Closes CodeGirlsInc#1042
Closes CodeGirlsInc#1043
Closes CodeGirlsInc#1044
Closes CodeGirlsInc#1045

- CT-42: Added 11 tests for cache.rs covering set/get, miss, overwrite, delete, multiple keys, typed values, enum dispatch
- CT-43: Added 8 tests for metrics.rs covering all counter increments, render output, and Default trait; 4 tests for rate_limit.rs
- CT-44: Extracted testable bootstrap logic from main.rs with component initialization tests
- CT-45: Added 9 handler integration tests using axum-test for verify, batch, submit, revoke, transfer endpoints
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@zainabbaba31-source is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@zainabbaba31-source 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

1 participant