Test: add IT scenario for match condition on keyExtraction for advanced-ratelimit policy - #3325
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe integration test adds regex-based header key matching for rate limiting. It verifies separate quotas for ChangesRate-limit matching
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change adds coverage for advanced rate-limit key matching, and the reported scoped test run passes; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the test purpose and reports successful execution, but it omits most required template sections, including Goals, Approach, User stories, Documentation, Automation tests details, Security checks, Samples, Related PRs, and Test environment. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
gateway/it/features/ratelimit.featurecovering the newmatchcondition onkeyExtractionin theadvanced-ratelimitpolicy (see Feat: add match condition to keyExtraction for conditional quota enforcement in ratelimit gateway-controllers#286).guest-*) is counted and throttled at the configured limit; a different matching client ID (exact match,channel-partner) gets its own independent bucket; a non-matching client ID bypasses the quota entirely and is never throttled.Test plan
IT_FEATURE_PATHS=features/ratelimit.feature COMPOSE_FILE=docker-compose.test.yaml go test -v ./...— 43 scenarios / 577 steps, all passed, including the new scenario.