summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2019-04-23 11:05:30 -0700
committerRitu Sood <ritu.sood@intel.com>2019-04-23 11:05:30 -0700
commitd7a2267ece49e6a79e54f01a2c90a618f7efb811 (patch)
treee03ed1c0cfd10a62cd67da3de49adda9c5ca7cd8
parent89d99a3ee089eceecd093d30e83aee8afa4466d6 (diff)
Fix multus and ovn tests
The tests were reporting success even when the interfaces were not created correctly Change-Id: I41a368e567bfe6d02e98bda495e88d6dee3c51ca Signed-off-by: Ritu Sood <ritu.sood@intel.com> Issue-ID: MULTICLOUD-578
-rwxr-xr-xkud/tests/multus.sh10
-rwxr-xr-xkud/tests/ovn4nfv.sh7
2 files changed, 11 insertions, 6 deletions
diff --git a/kud/tests/multus.sh b/kud/tests/multus.sh
index 859fa3bb..2cff84bd 100755
--- a/kud/tests/multus.sh
+++ b/kud/tests/multus.sh
@@ -29,12 +29,14 @@ setup $multus_deployment_name
deployment_pod=$(kubectl get pods | grep $multus_deployment_name | awk '{print $1}')
echo "===== $deployment_pod details ====="
kubectl exec -it $deployment_pod -- ip a
-multus_nic=$(kubectl exec -it $deployment_pod -- ifconfig | grep "eth1")
-if [ -z "$multus_nic" ]; then
- echo "The $deployment_pod pod doesn't contain the eth1 nic"
+multus_nic=$(kubectl exec -it $deployment_pod -- ip a)
+if [[ $multus_nic != *"net1"* ]]; then
+ echo "The $deployment_pod pod doesn't contain the net1 nic"
exit 1
+else
+ echo "Test Completed!"
fi
-popd
# Teardown
teardown $multus_deployment_name
+popd
diff --git a/kud/tests/ovn4nfv.sh b/kud/tests/ovn4nfv.sh
index 37fddfd8..de8631f4 100755
--- a/kud/tests/ovn4nfv.sh
+++ b/kud/tests/ovn4nfv.sh
@@ -33,10 +33,13 @@ setup $ovn4nfv_deployment_name
deployment_pod=$(kubectl get pods | grep $ovn4nfv_deployment_name | awk '{print $1}')
echo "===== $deployment_pod details ====="
kubectl exec -it $deployment_pod -- ip a
-multus_nic=$(kubectl exec -it $deployment_pod -- ifconfig | grep "net1")
-if [ -z "$multus_nic" ]; then
+
+ovn_nic=$(kubectl exec -it $deployment_pod -- ip a )
+if [[ $ovn_nic != *"net1"* ]]; then
echo "The $deployment_pod pod doesn't contain the net1 nic"
exit 1
+else
+ echo "Test Completed!"
fi
# Teardown