mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-01 00:52:37 +00:00
Modify the judgment of test results (#936)
This commit is contained in:
@@ -7,7 +7,13 @@ kubectl create -f yamls/simple-macvlan1.yml
|
|||||||
kubectl wait --for=condition=ready -l app=macvlan --timeout=300s pod
|
kubectl wait --for=condition=ready -l app=macvlan --timeout=300s pod
|
||||||
|
|
||||||
echo "check macvlan1-worker1 interface: net1"
|
echo "check macvlan1-worker1 interface: net1"
|
||||||
kubectl exec macvlan1-worker1 -- ip a show dev net1
|
net=$(kubectl exec macvlan1-worker1 -- ip a show dev net1)
|
||||||
|
if [ $? -eq 0 ];then
|
||||||
|
echo "macvlan1-worker1 pod has net1 card"
|
||||||
|
else
|
||||||
|
echo "macvlan1-worker1 pod has no net1 card"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "check macvlan1-worker1 interface address: net1"
|
echo "check macvlan1-worker1 interface address: net1"
|
||||||
ipaddr=$(kubectl exec macvlan1-worker1 -- ip -j a show | jq -r \
|
ipaddr=$(kubectl exec macvlan1-worker1 -- ip -j a show | jq -r \
|
||||||
@@ -17,7 +23,13 @@ if [ $ipaddr != "10.1.1.11" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "check macvlan1-worker2 interface: net1"
|
echo "check macvlan1-worker2 interface: net1"
|
||||||
kubectl exec macvlan1-worker2 -- ip a show dev net1
|
net2=$(kubectl exec macvlan1-worker2 -- ip a show dev net1)
|
||||||
|
if [ $? -eq 0 ];then
|
||||||
|
echo "macvlan1-worker2 pod has net1 card"
|
||||||
|
else
|
||||||
|
echo "macvlan1-worker2 pod has no net1 card"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "check macvlan1-worker2 interface address: net1"
|
echo "check macvlan1-worker2 interface address: net1"
|
||||||
ipaddr=$(kubectl exec macvlan1-worker2 -- ip -j a show | jq -r \
|
ipaddr=$(kubectl exec macvlan1-worker2 -- ip -j a show | jq -r \
|
||||||
|
Reference in New Issue
Block a user