From 21c89b336465e824074d34e059f7377dcee600c4 Mon Sep 17 00:00:00 2001 From: Erik Wramner Date: Wed, 31 Jul 2019 12:59:49 +0200 Subject: [PATCH] Added TODO as per code review and removed one sleep --- test/tests.bats | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/tests.bats b/test/tests.bats index 2b140e88..dd5eef9d 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -1216,11 +1216,6 @@ 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" ] } @@ -1446,6 +1441,7 @@ load 'test_helper/bats-assert/load' if ! (docker exec mail doveadm auth test -x service=smtp setup_email_add@example.com 'test_password' >/dev/null); then # Possibly the cron job has not had time to run yet, waiting a while is better than a false alarm + # TODO find a better way to detect when the container is ready sleep 30 fi