mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 21:47:40 +03:00
test: Fix Dovecot interop tests
Dovecot no longer prints the specific error message used to detect successful startup.
This commit is contained in:
parent
ac4a75b7d5
commit
90f88c89cd
1 changed files with 4 additions and 1 deletions
|
@ -36,6 +36,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/foxcpp/maddy/tests"
|
"github.com/foxcpp/maddy/tests"
|
||||||
)
|
)
|
||||||
|
@ -47,6 +48,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const dovecotConf = `base_dir = $ROOT/run/
|
const dovecotConf = `base_dir = $ROOT/run/
|
||||||
|
state_dir = $ROOT/lib/
|
||||||
log_path = /dev/stderr
|
log_path = /dev/stderr
|
||||||
ssl = no
|
ssl = no
|
||||||
|
|
||||||
|
@ -149,7 +151,8 @@ func runDovecot(t *testing.T) (string, *exec.Cmd) {
|
||||||
line := scnr.Text()
|
line := scnr.Text()
|
||||||
|
|
||||||
// One of messages printed near completing initialization.
|
// One of messages printed near completing initialization.
|
||||||
if strings.Contains(line, "master: Error: file_dotlock_open(/var/lib/dovecot/instances) failed: Permission denied") {
|
if strings.Contains(line, "starting up for imap") {
|
||||||
|
time.Sleep(500*time.Millisecond)
|
||||||
ready <- struct{}{}
|
ready <- struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue