mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-31 15:14:26 +01:00
Add comprehensive unit tests for the rate limiter implementation: - TestRateLimiterBasic: Verify basic token bucket behavior - TestRateLimiterNoMatchingRules: Requests pass when no rules match - TestRateLimiterLRUEviction: Cache respects max size limit - TestRateLimiterPathMatching: Different paths have independent limits - TestRateLimiterMultipleRulesAllMustPass: Strictest matching rule wins - TestRateLimiterPerKeyIsolation: Different users have separate quotas - TestExtractRateLimitKeyIP/IPv6: IP-based key extraction - TestRateLimitConfigRate/EffectiveBurst/Matches: Config calculations - TestSendRateLimitResponseHTTP/GRPC: Response format verification - TestRateLimiterTokenRefill: Token bucket refills over time