ci: add scripts for running full test suite with rate limiting#137
Merged
jakebromberg merged 1 commit intomainfrom Jan 31, 2026
Merged
ci: add scripts for running full test suite with rate limiting#137jakebromberg merged 1 commit intomainfrom
jakebromberg merged 1 commit intomainfrom
Conversation
d275590 to
07d17d5
Compare
- Add scripts/ci-env.sh to start CI environment with --full flag - Add scripts/ci-test.sh to run tests with rate limiting enabled - Update package.json to use shell scripts for CI commands - Increase rate limits in docker-compose.yml to avoid test conflicts - Admin ban tests disabled until credentials configured (see #133) The full test suite can now be run with: npm run ci:env:full && npm run ci:test:full && npm run ci:clean
0933610 to
6a51a92
Compare
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.
Summary
Adds dedicated scripts for running CI tests with optional rate limiting support.
Why
The test suite has two categories of tests that are conditionally skipped:
Rate limiting tests - These require specific timing windows and request limits to be configured. Running them with default settings would either cause false failures (limits too low) or make the tests meaningless (limits too high). They're skipped by default with
TEST_RATE_LIMITING=false.Admin ban tests - These require authenticated admin credentials (
AUTH_USERNAME/AUTH_PASSWORD) to test the ban functionality. Since CI doesn't have these credentials configured by default, these tests are skipped.Previously, there was no easy way to run the full test suite with these features enabled. Developers had to manually set environment variables and hope they matched what docker-compose expected.
What
ci-env.sh- Sets up the CI Docker environment. The--fullflag exportsTEST_RATE_LIMITING=trueand optionally enables the default admin user if credentials are configured.ci-test.sh- Runs the test suite with proper environment variables. The--fullflag enables rate limiting tests and passes the rate limit configuration to Jest so test assertions match the actual limits.docker-compose.yml - Adds rate limiting environment variables with CI-appropriate defaults (short windows, low limits for fast test execution).
Usage
Test plan
npm run ci:testmockruns standard tests without rate limitingnpm run ci:testmock:fullruns full suite with rate limiting tests