Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ jobs:
NODE_ENV: test
run: ./script/warm-before-tests.mjs

- name: Start production-like server in the background
if: ${{ matrix.test-group == 'rendering' || matrix.test-group == 'routing' || matrix.test-group == 'content' }}
env:
NODE_ENV: test
PORT: 4000
run: |
node server.mjs &
sleep 3
curl --retry-connrefused --retry 5 -I --fail http://localhost:4000/healthz

- name: Run tests
env:
DIFF_FILE: get_diff_files.txt
Expand Down
2 changes: 1 addition & 1 deletion middleware/rate-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import statsd from '../lib/statsd.js'

const EXPIRES_IN_AS_SECONDS = 60

const MAX = process.env.RATE_LIMIT_MAX ? parseInt(process.env.RATE_LIMIT_MAX, 10) : 1000
const MAX = process.env.RATE_LIMIT_MAX ? parseInt(process.env.RATE_LIMIT_MAX, 10) : 10000
if (isNaN(MAX)) {
throw new Error(`process.env.RATE_LIMIT_MAX (${process.env.RATE_LIMIT_MAX}) not a number`)
}
Expand Down
Loading