From e47c73f7895d7d0816fd68ddb58f00600605fd1a Mon Sep 17 00:00:00 2001 From: Erik Wramner Date: Mon, 29 Jul 2019 12:27:08 +0200 Subject: [PATCH] Wait and retry if pre-defined user login fails --- test/tests.bats | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/tests.bats b/test/tests.bats index bf561cb2..7ce954d6 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -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" ] }