Wait and retry if pre-defined user login fails

This commit is contained in:
Erik Wramner 2019-07-29 12:27:08 +02:00
parent 1f298e3a76
commit e47c73f789
1 changed files with 5 additions and 0 deletions

View File

@ -1212,6 +1212,11 @@ load 'test_helper/bats-assert/load'
@test "checking user login: predefined user can login" {
# This should really not be necessary, but this test sometimes fails, probably due to timing
if ! (docker exec mail doveadm auth test -x service=smtp pass@localhost.localdomain 'may be \a `p^a.*ssword' >/dev/null); then
sleep 60
fi
result=$(docker exec mail doveadm auth test -x service=smtp pass@localhost.localdomain 'may be \a `p^a.*ssword' | grep 'auth succeeded')
[ "$result" = "passdb: pass@localhost.localdomain auth succeeded" ]
}