first refactoring fr *.bats according to shellcheck

This commit is contained in:
Georg Lauterbach 2020-11-05 13:32:42 +01:00
parent 46998dd816
commit 9ce719213b
No known key found for this signature in database
GPG key ID: 386D76E7AD496709
31 changed files with 141 additions and 134 deletions

View file

@ -21,7 +21,7 @@ setup_file() {
--cap-add=SYS_PTRACE \
-e PERMIT_DOCKER=host \
-e DMS_DEBUG=0 \
-h mail.my-domain.com -t ${NAME}
-h mail.my-domain.com -t "${NAME}"
wait_for_smtp_port_in_container mail_with_sdbox_format
}
@ -30,7 +30,7 @@ teardown_file() {
}
@test "first" {
skip 'only used to call setup_file from setup'
skip 'this test must come first to reliably identify when to run setup_file'
}
@ -38,10 +38,11 @@ teardown_file() {
run docker exec mail_with_sdbox_format /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user1.txt"
assert_success
# shellcheck disable=SC2016
repeat_until_success_or_timeout 30 docker exec mail_with_sdbox_format /bin/sh -c '[ $(ls /var/mail/localhost.localdomain/user1/mailboxes/INBOX/dbox-Mails/u.1 | wc -l) -eq 1 ]'
}
@test "last" {
skip 'only used to call teardown_file from teardown'
skip 'this test is only there to reliably mark the end for the teardown_file'
}