summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-04-07 15:14:07 -0700
committerBryan Sullivan <bs3131@att.com>2016-04-07 22:17:49 +0000
commit529a79163366a7f82675ab70eb02727ab15f96a8 (patch)
tree24288c181fa58c0e7bc3ddd5b2391239f6910ae1
parent4cefb1e9f1a1b7cde654854f3694c506e5c6f6be (diff)
Improve success/fail test
JIRA: COPPER-4 Change-Id: Id6728c267f67f4a24231b6e7d7826b21d81a9546 Signed-off-by: blsaws <bryan.sullivan@att.com> (cherry picked from commit 34ba4633e7ca7959f3c83fc0d6ee12171cdd98fe)
-rw-r--r--tests/adhoc/dmz01.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/adhoc/dmz01.sh b/tests/adhoc/dmz01.sh
index 7ca2b9c..11d657a 100644
--- a/tests/adhoc/dmz01.sh
+++ b/tests/adhoc/dmz01.sh
@@ -119,15 +119,18 @@ test_cirros1_ID=$(openstack server list | awk "/ cirros1 / { print \$2 }")
echo "Get cirros2 instance ID"
test_cirros2_ID=$(openstack server list | awk "/ cirros2 / { print \$2 }")
-echo "Check for presence of cirros1 ID in Congress policy 'test' table 'dmz_server'"
-dmz_cirros1=$(openstack congress policy row list test dmz_server | awk "/ $test_cirros1_ID / { print \$2 }")
-
-echo "Check for presence of cirros1 ID in Congress policy 'test' table 'dmz_server'"
-dmz_cirros2=$(openstack congress policy row list test dmz_server | awk "/ $test_cirros2_ID / { print \$2 }")
-
echo "Verify cirros1 and cirros2 IDs are in the Congress policy 'test' table 'dmz_server'"
-if [ "$dmz_cirros1" == "$test_cirros1_ID" ] && [ "$dmz_cirros2" == "$test_cirros2_ID" ]; then echo "Test Success!"
-else echo "Test Failed!"
-fi
+COUNTER=5
+RESULT="Test Failed!"
+until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ echo "Check for presence of cirros1 ID in Congress policy 'test' table 'dmz_server'"
+ dmz_cirros1=$(openstack congress policy row list test dmz_server | awk "/ $test_cirros1_ID / { print \$2 }")
+ echo "Check for presence of cirros2 ID in Congress policy 'test' table 'dmz_server'"
+ dmz_cirros2=$(openstack congress policy row list test dmz_server | awk "/ $test_cirros2_ID / { print \$2 }")
+ if [ "$dmz_cirros1" == "$test_cirros1_ID" ] && [ "$dmz_cirros2" == "$test_cirros2_ID" ]; then RESULT="Test Success!"
+ fi
+ let COUNTER-=1
+done
+echo $RESULT
set +x #echo off