From 2c65b0c260bfd3a414f5e65c323821ed576ed3ae Mon Sep 17 00:00:00 2001 From: Georg Lauterbach Date: Fri, 6 Nov 2020 14:11:42 +0100 Subject: [PATCH] use wait_for_smtp function instead of sleep --- test/mail_smtponly.bats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mail_smtponly.bats b/test/mail_smtponly.bats index f6925ebf..0710bb86 100644 --- a/test/mail_smtponly.bats +++ b/test/mail_smtponly.bats @@ -63,7 +63,8 @@ function teardown_file() { assert_success run docker exec mail_smtponly /bin/sh -c "/etc/init.d/postfix reload" assert_success - sleep 5 + + wait_for_smtp_port_in_container mail_smtponly run docker exec mail_smtponly /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/smtp-only.txt" assert_success run docker exec mail_smtponly /bin/sh -c 'grep -cE "to=.*status\=sent" /var/log/mail/mail.log'