Skip to content

V1 [TEST] Rate limiter integration test #80

Description

@austin-barrington

Context

Rate limiting is a V1 requirement (#62 tracks the bug where the rate limiter is broken). Once fixed, there must be an integration test.

Deliverables

Add an integration test at tests/integration/rate_limiter_test.rs:

  1. Start server with rate_limit.enabled = true and max_requests_per_second = 5
  2. Fire 5 rapid requests — all should succeed
  3. Fire 5 more rapid requests — at least some should be rejected with HTTP 429
  4. Wait 1 second
  5. Fire 1 request — should succeed
  6. Verify metrics endpoint shows hyperbytedb_rate_limit_denied_total > 0

References

  • src/adapters/http/auth_middleware.rs:142-163 — rate limiter code (currently broken)
  • #62 — rate limiter bug ticket

Priority

P2 — Test coverage after bug fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions