Extend weave-kube smoke test: add a policy with blank 'from'
Per issue #3095 this crashes the commenting code. Also added check to see if the pods are still running.
This commit is contained in:
1 parent
4b5299d124
commit
527bcffe3b
1 file changed
+17
@@ -94,6 +94,20 @@ spec:
|
|||||||
run: nettest
|
run: nettest
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Another policy, this time with no 'from' section, just to check that doesn't cause a crash
|
||||||
|
run_on $HOST1 "$KUBECTL apply -f -" <<EOF
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: test840f
|
||||||
|
spec:
|
||||||
|
ingress:
|
||||||
|
- {}
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
run: norealpods
|
||||||
|
EOF
|
||||||
|
|
||||||
check_ready() {
|
check_ready() {
|
||||||
run_on $HOST1 "$KUBECTL get nodes | grep -c -w Ready | grep $NUM_HOSTS"
|
run_on $HOST1 "$KUBECTL get nodes | grep -c -w Ready | grep $NUM_HOSTS"
|
||||||
}
|
}
|
||||||
@@ -135,6 +149,9 @@ assert_raises 'wait_for_x check_all_pods_communicate pods'
|
|||||||
# Check that a pod can contact the outside world
|
# Check that a pod can contact the outside world
|
||||||
assert_raises "$SSH $HOST1 $KUBECTL exec $podName -- $PING 8.8.8.8"
|
assert_raises "$SSH $HOST1 $KUBECTL exec $podName -- $PING 8.8.8.8"
|
||||||
|
|
||||||
|
# Check that our pods haven't crashed
|
||||||
|
assert "$SSH $HOST1 $KUBECTL get pods -n kube-system -l name=weave-net | grep -c Running" 3
|
||||||
|
|
||||||
tear_down_kubeadm
|
tear_down_kubeadm
|
||||||
|
|
||||||
# Destroy our test ipset, and implicitly check it is still there
|
# Destroy our test ipset, and implicitly check it is still there
|
||||||
|
|||||||
Reference in new issue
Block a user