From bbab4ef3fcfad6f04dc7258d1b756f8fd5778cb5 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Tue, 12 Nov 2019 09:23:45 +0100 Subject: [PATCH] fix: fix test setup.sh debug fetchmail on wildcard domains on hosts that belong to wildcard domains pop3.example.com might actually resolve to pop3.example.com.[mydomain.com] and give a valid ip the return code of fetchmail then no longer is 11 (dns failure) but something else (2 for socket error in our case) to make sure we always get return code 11 we use the domain name pop3.example.com. that is not allowed to be resolved to a subdomain. --- test/config/fetchmail.cf | 2 +- test/tests.bats | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/config/fetchmail.cf b/test/config/fetchmail.cf index 59ce814a..e4a3c414 100644 --- a/test/config/fetchmail.cf +++ b/test/config/fetchmail.cf @@ -1,4 +1,4 @@ -poll pop3.example.com with proto POP3 +poll pop3.example.com. with proto POP3 user 'username' there with password 'secret' is 'user2@domain.tld' diff --git a/test/tests.bats b/test/tests.bats index f73d37fe..79ce97dc 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -1086,8 +1086,7 @@ function count_processed_changes() { @test "checking setup.sh: setup.sh debug fetchmail" { run ./setup.sh -c mail debug fetchmail [ "$status" -eq 11 ] -# TODO: Fix output check -# [ "$output" = "fetchmail: no mailservers have been specified." ] + [[ "$output" == *"fetchmail: normal termination, status 11"* ]] } @test "checking setup.sh: setup.sh debug inspect" { run ./setup.sh -c mail debug inspect