est(shipment): add rate-limit boundary regression tests#415
Merged
dinahmaccodes merged 1 commit intoMay 30, 2026
Conversation
- test_rate_limit_boundary_exact_interval_is_allowed: update at exactly min_status_update_interval (60s) must succeed - test_rate_limit_boundary_one_second_before_is_blocked: update at 59s must return RateLimitExceeded - test_rate_limit_boundary_one_second_after_is_allowed: update at 61s must succeed - test_rate_limit_admin_bypasses_interval: admin update with 0s elapsed must succeed, documenting the intentional bypass All tests use setup_in_transit_shipment helper to isolate boundary behaviour from the first-update path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #367
Add regression tests for status update rate limiting
Extends rate-limit coverage with boundary tests around min_status_update_interval (default 60s).
What changed
Why
The < comparison in update_status makes the exact boundary non-obvious. These tests pin the
deterministic behaviour so any future change to the interval check will cause an explicit test
failure.