From d2b17690f91d30570138db8d094b274f2dfcbe8b Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 11 Jun 2015 12:13:01 +0100 Subject: [PATCH] use dnsutils image in one test instead of awk on all the tests. --- test/630_proxy_dns_test.sh | 4 ++-- test/config.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/630_proxy_dns_test.sh b/test/630_proxy_dns_test.sh index 344d2951..ddc9b2d4 100755 --- a/test/630_proxy_dns_test.sh +++ b/test/630_proxy_dns_test.sh @@ -11,8 +11,8 @@ start_suite "Proxy registers containers with dns" weave_on $HOST1 launch-dns 10.2.254.1/24 weave_on $HOST1 launch-proxy --with-dns -proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $C2_NAME $SMALL_IMAGE /bin/sh -proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 $DNS_IMAGE /bin/sh +proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $C2_NAME $DNS_IMAGE /bin/sh +proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 $DNS_IMAGE /bin/sh assert_dns_record $HOST1 c1 $C2_NAME $C2 assert_dns_record $HOST1 c2 $C1_NAME $C1 diff --git a/test/config.sh b/test/config.sh index a0ec0074..5efbf5e7 100644 --- a/test/config.sh +++ b/test/config.sh @@ -128,7 +128,7 @@ assert_dns_record() { [ -z "$DEBUG" ] || greyly echo "Checking whether the IPs '$@' exists at $host:$container" for ip in "$@" ; do - assert "exec_on $host $container getent hosts $ip | awk '{print \$2}'" "$name" + assert "exec_on $host $container getent hosts $ip | tr -s ' '" "$ip $name" done }