Ver Fonte

fix: allow slower dovecot imaps auth probe

Give the deployment IMAPS login check enough time for the invalid-account authentication path to return a normal auth failure.

AI-Co-Authored-By: Codex
chendeben há 1 mês atrás
pai
commit
88b8f0e243
2 ficheiros alterados com 2 adições e 1 exclusões
  1. 1 1
      scripts/deploy-remote.sh
  2. 1 0
      test/deploy-remote-script.test.js

+ 1 - 1
scripts/deploy-remote.sh

@@ -127,7 +127,7 @@ verify_mail_runtime() {
     let buffer = "";
     let finished = false;
     let loginSent = false;
-    const timer = setTimeout(() => finish(false), 5000);
+    const timer = setTimeout(() => finish(false), 15000);
 
     function finish(ok) {
       if (finished) return;

+ 1 - 0
test/deploy-remote-script.test.js

@@ -41,6 +41,7 @@ test('isolates runtime probes and setup scripts from the SSH heredoc stdin', ()
 
 test('checks the Dovecot IMAPS authentication path through Lua passdb', () => {
   assert.match(scriptSource, /tls\.connect\(\{[\s\S]*host: "dovecot"[\s\S]*port: 31993/);
+  assert.match(scriptSource, /setTimeout\(\(\) => finish\(false\), 15000\)/);
   assert.match(scriptSource, /mailhub-healthcheck@invalid\.invalid/);
   assert.match(scriptSource, /temporary authentication failure\|unavailable/);
   assert.match(scriptSource, /Dovecot IMAPS authentication path check failed\./);