From 6a06d0f95fb3d9639ed6b4dc602ebcb2ee4d7262 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Wed, 22 Apr 2015 15:37:50 +0100 Subject: [PATCH] Simplify ping tests to avoid set -e precipitated exit in failure case --- test/100_cross_hosts_test.sh | 3 +-- test/110_encryption_test.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/100_cross_hosts_test.sh b/test/100_cross_hosts_test.sh index 13789bbd..faa445e5 100755 --- a/test/100_cross_hosts_test.sh +++ b/test/100_cross_hosts_test.sh @@ -18,7 +18,6 @@ weave_on $HOST2 launch $HOST1 weave_on $HOST2 run $C2/24 -t --name=c2 ubuntu weave_on $HOST1 run $C1/24 -t --name=c1 ubuntu -ok=$(exec_on $HOST1 c1 ping -q -c 4 $C2 >&2 && echo ok) -assert "echo $ok" "ok" +assert_raises "exec_on $HOST1 c1 ping -q -c 4 $C2" end_suite diff --git a/test/110_encryption_test.sh b/test/110_encryption_test.sh index 79831acf..2e604984 100755 --- a/test/110_encryption_test.sh +++ b/test/110_encryption_test.sh @@ -18,7 +18,6 @@ weave_on $HOST2 launch -password notverysecure $HOST1 weave_on $HOST2 run $C2/24 -t --name=c2 ubuntu weave_on $HOST1 run $C1/24 -t --name=c1 ubuntu -ok=$(exec_on $HOST1 c1 ping -q -c 4 $C2 >&2 && echo ok) -assert "echo $ok" "ok" +assert_raises "exec_on $HOST1 c1 ping -q -c 4 $C2" end_suite