Bug fix in odl-sfc testcase 79/22979/1
authorManuel Buil <manuel.buil@ericsson.com>
Tue, 11 Oct 2016 08:30:10 +0000 (10:30 +0200)
committerJose Lausuch <jose.lausuch@ericsson.com>
Tue, 11 Oct 2016 11:57:29 +0000 (11:57 +0000)
Test is stopping if the route to the VMs ip range is already there because
the command that adds that, exits with code 1 and set -e is activated.
Now it is checked if it is there and if not, the command is executed

Change-Id: I820a55aff2572aadcb1950fa9218b114a9058c57
Signed-off-by: Manuel Buil <manuel.buil@ericsson.com>
(cherry picked from commit e2c2ff612e7086ce2a1520029f5f58e75186ec17)

testcases/features/sfc/compute_presetup_CI.bash

index 57d3d82..c776c2f 100755 (executable)
@@ -17,5 +17,10 @@ sshpass -p r00tme scp $ssh_options correct_classifier.bash ${INSTALLER_IP}:/root
 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'scp correct_classifier.bash '"$ip"':/root'
 
 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ifconfig br-int up'
+output=$(sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route | \
+cut -d" " -f1 | grep 11.0.0.0' ; exit 0)
+
+if [ -z "$output" ]; then
 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route add 11.0.0.0/24 \
 dev br-int'
+fi