Fix multus and ovn tests 83/86083/1
authorRitu Sood <ritu.sood@intel.com>
Tue, 23 Apr 2019 18:05:30 +0000 (11:05 -0700)
committerRitu Sood <ritu.sood@intel.com>
Tue, 23 Apr 2019 18:05:30 +0000 (11:05 -0700)
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

kud/tests/multus.sh
kud/tests/ovn4nfv.sh

index 859fa3b..2cff84b 100755 (executable)
@@ -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
index 37fddfd..de8631f 100755 (executable)
@@ -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