mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Fix polling with pipes
This commit is contained in:
parent
43ae814776
commit
a933ef27ac
|
@ -44,7 +44,9 @@ teardown_file() {
|
|||
run docker exec mail_lmtp_ip /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user1.txt"
|
||||
assert_success
|
||||
|
||||
repeat_until_success_or_timeout 60 run docker exec mail_lmtp_ip /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l"
|
||||
# polling needs to avoid wc -l's unconditionally successful return status
|
||||
repeat_until_success_or_timeout 60 run docker exec mail_lmtp_ip /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)'"
|
||||
run docker exec mail_lmtp_ip /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l"
|
||||
assert_success
|
||||
assert_output 1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue