Просмотр исходного кода

Merge pull request #3473 from overleaf/jpa-add-back-rate-limit-clear

[SmokeTests] add back the clearing of the overleaf-login rate-limit

GitOrigin-RevId: af2f7ad84083d757416d39784f31b3fa5577c1c3
Jakob Ackermann 5 лет назад
Родитель
Сommit
d01216ee38
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      services/web/test/smoke/src/steps/001_clearRateLimits.js

+ 10 - 1
services/web/test/smoke/src/steps/001_clearRateLimits.js

@@ -18,6 +18,11 @@ async function clearLoginRateLimit() {
   await clearRateLimit('login', Settings.smokeTest.user)
 }
 
+async function clearOverleafLoginRateLimit() {
+  if (!Settings.overleaf) return
+  await clearRateLimit('overleaf-login', Settings.smokeTest.rateLimitSubject)
+}
+
 async function clearOpenProjectRateLimit() {
   await clearRateLimit(
     'open-project',
@@ -27,7 +32,11 @@ async function clearOpenProjectRateLimit() {
 
 async function run({ processWithTimeout, timeout }) {
   await processWithTimeout({
-    work: Promise.all([clearLoginRateLimit(), clearOpenProjectRateLimit()]),
+    work: Promise.all([
+      clearLoginRateLimit(),
+      clearOverleafLoginRateLimit(),
+      clearOpenProjectRateLimit()
+    ]),
     timeout,
     message: 'cleanupRateLimits timed out'
   })