From aec8756151560fb449aa41c2e5511021d4872b62 Mon Sep 17 00:00:00 2001 From: Martynas Pumputis Date: Fri, 3 Aug 2018 13:56:34 +0200 Subject: [PATCH] npc: Add integration test case for ingress.ipBlock --- test/840_weave_kube_3_test.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/840_weave_kube_3_test.sh b/test/840_weave_kube_3_test.sh index 2e7a5e8a..f8ea2c1a 100755 --- a/test/840_weave_kube_3_test.sh +++ b/test/840_weave_kube_3_test.sh @@ -255,6 +255,27 @@ assert_raises "$SSH $HOST1 $KUBECTL exec $denyPodName -- curl -s -S -f -m 2 http assert_raises "! $SSH $HOST1 curl -s -S -f -m 2 http://$VIRTUAL_IP/status >/dev/null" assert_raises "! $SSH $HOST1 curl -s -S -f -m 2 http://$HOST2:31138/status >/dev/null" +# allow access only from weave bridge IP of host1 to test ipBlock +run_on $HOST1 "$KUBECTL apply -f -" </dev/null" + +run_on $HOST1 "$KUBECTL delete netpol allow-via-weave-bridge-of-host1" + # allow access from anywhere run_on $HOST1 "$KUBECTL apply -f -" <