From f6f705512a35fc938b5f4a14e5658313a253be7e Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:26:15 +0200 Subject: [PATCH] Fixed rate limiting in frontend tests. --- .github/workflows/frontend-admin-tests.yml | 8 ++++++-- .github/workflows/frontend-tests.yml | 2 +- CHANGELOG.md | 8 ++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index 44967124e..31386e9b4 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -67,8 +67,12 @@ jobs: name: Write custom settings.json that enables the Admin UI tests run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json" - - name: increase maxHttpBufferSize - run: "sed -i 's/\"maxHttpBufferSize\": 10000/\"maxHttpBufferSize\": 100000/' settings.json" + name: Disable import/export rate limiting + run: | + sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 1000000/' -i settings.json + - + name: Increase express-rate-limit + run: - name: Remove standard frontend test files, so only admin tests are run run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 7992e5838..5b1e578ca 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -127,7 +127,7 @@ jobs: - name: Disable import/export rate limiting run: | - sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json + sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 1000000/' -i settings.json # XXX we should probably run all tests, because plugins could effect their results - name: Remove standard frontend test files, so only plugin tests are run diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6ca3ffa..c86e8a62a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.9.3 + +### Compability changes + +* express-rate-limit has been bumped to 7.0.0: This involves the breaking change that "max: 0" +in the importExportRateLimiting is set to always trigger. So set it to your desired value. +If you haven't changed that value in the settings.json you are all set. + # 1.9.2 ### Notable enhancements and fixes