From 4eeb8465074bfd14ae11bd268491f585fbe16562 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 1 Feb 2017 12:19:26 +0000 Subject: [PATCH] Add tests for connectivity to the world --- test/830_cni_plugin_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/830_cni_plugin_test.sh b/test/830_cni_plugin_test.sh index 305ccf19..b5d2cd4a 100755 --- a/test/830_cni_plugin_test.sh +++ b/test/830_cni_plugin_test.sh @@ -44,6 +44,10 @@ C2IP=$(container_ip $HOST1 c2) assert_raises "exec_on $HOST1 c1 $PING $C2IP" assert_raises "exec_on $HOST1 c2 $PING $C1IP" +# Check if the route to the outside world works +assert_raises "exec_on $HOST1 c1 $PING 8.8.8.8" +# Container c2 should not have a default route to the world +assert_raises "exec_on $HOST1 c2 sh -c '! $PING 8.8.8.8'" # Now remove and start a new container to see if anything breaks docker_on $HOST1 rm -f c2