From bd364f787e63e88604a94bb42153b37baf87b4ac Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 9 Jun 2015 19:08:59 +0100 Subject: [PATCH] fix silent failure in assert_dns_record test If the name cannot be resolved, getent fails, which in turn causes assert_dns_record to just return with a non-zero status at that point, which causes the whole test to just terminate with a non-zero status, but no indication whatsoever what had gone wrong. --- test/config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/config.sh b/test/config.sh index 50cf0a3f..5efbf5e7 100644 --- a/test/config.sh +++ b/test/config.sh @@ -124,8 +124,7 @@ assert_dns_record() { exp_ips_regex=$(echo "$@" | sed -r 's/ /\\\|/g') [ -z "$DEBUG" ] || greyly echo "Checking whether $name exists at $host:$container" - got_ip=$(exec_on $host $container getent hosts $name) - assert_raises "echo '$got_ip' | grep -q '$exp_ips_regex'" + assert_raises "exec_on $host $container getent hosts $name | grep -q '$exp_ips_regex'" [ -z "$DEBUG" ] || greyly echo "Checking whether the IPs '$@' exists at $host:$container" for ip in "$@" ; do