From de19c6bd36ae2f3f69098fc42c6569fa813622cd Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Tue, 11 Apr 2023 20:11:16 +0200 Subject: [PATCH] tests: fix dovecot: ldap mail delivery works (#3252) When a new version of docker-mailserver is available the account used in this tests also gets the postmaster notification for the new version. The mailbox then may contain 2 mails but only one with 'This is a test mail.'. Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> --- test/tests/serial/mail_with_ldap.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/serial/mail_with_ldap.bats b/test/tests/serial/mail_with_ldap.bats index 79100f01..75768bbb 100644 --- a/test/tests/serial/mail_with_ldap.bats +++ b/test/tests/serial/mail_with_ldap.bats @@ -151,7 +151,7 @@ function teardown_file() { @test "checking dovecot: ldap mail delivery works" { run docker exec mail_with_ldap /bin/sh -c "sendmail -f user@external.tld some.user@${FQDN_LOCALHOST_A} < /tmp/docker-mailserver-test/email-templates/test-email.txt" sleep 10 - run docker exec mail_with_ldap /bin/sh -c "ls -A /var/mail/${FQDN_LOCALHOST_A}/some.user/new | wc -l" + run docker exec mail_with_ldap /bin/sh -c "grep -R 'This is a test mail.' /var/mail/${FQDN_LOCALHOST_A}/some.user/new/ | wc -l" assert_success assert_output 1 }