summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-06-14 19:47:39 -0700
committerblsaws <bryan.sullivan@att.com>2016-06-14 19:47:39 -0700
commit59596787339714bff92fb4be8ffe2b148bbcafff (patch)
tree2ca30f14737aa8d34dbd578be88e8b13d5b6ecc5 /tests
parent5c856171a061e7ce3f2ee6a28b76e08f907de368 (diff)
Corrections to API auth redesign and more info output in tests.
Change-Id: Ie7fad60e2fc51517929956c7c139125d0f19ffa1 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/dmz.sh7
-rw-r--r--tests/reserved_subnet.sh9
-rw-r--r--tests/smtp_ingress.sh10
3 files changed, 16 insertions, 10 deletions
diff --git a/tests/dmz.sh b/tests/dmz.sh
index ff5a5cd..f915378 100644
--- a/tests/dmz.sh
+++ b/tests/dmz.sh
@@ -37,6 +37,8 @@
pass() {
echo "Hooray!"
+ set +x #echo off
+ exit 0
}
# Use this to trigger fail() at the right places
@@ -108,8 +110,6 @@ neutron router-gateway-set test_router test_public
echo "Add router internal for internal network"
neutron router-interface-add test_router subnet=test_internal
-echo "Wait up to a minute as 'neutron router-interface-add' blocks the neutron-api for some time..."
-# add a delay since the previous command takes the neutron-api offline for a while (?)
COUNTER=1
RESULT="Failed!"
until [[ "$COUNTER" -gt 6 || "$RESULT" == "Success!" ]]; do
@@ -154,6 +154,7 @@ echo "Verify cirros1 and cirros2 IDs are in the Congress policy 'test' table 'dm
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ openstack congress policy row list test dmz_server
dmz_cirros1=$(openstack congress policy row list test dmz_server | awk "/ $test_cirros1_ID / { print \$2 }")
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
@@ -167,6 +168,7 @@ echo "Verify cirros1 ID is in the Congress policy 'test' table 'dmz_placement_er
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ openstack congress policy row list test dmz_placement_error
dmz_cirros1=$(openstack congress policy row list test dmz_placement_error | awk "/ $test_cirros1_ID / { print \$2 }")
if [ "$dmz_cirros1" == "$test_cirros1_ID" ]; then RESULT="Test Success!"; fi
let COUNTER-=1
@@ -182,6 +184,7 @@ echo "Verify cirros1 is paused"
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ nova list
cirros1_status=$(nova list | awk "/ cirros1 / { print \$6 }")
if [ "$cirros1_status" == "PAUSED" ]; then RESULT="Test Success!"; fi
let COUNTER-=1
diff --git a/tests/reserved_subnet.sh b/tests/reserved_subnet.sh
index f30c3c5..7fb7da1 100644
--- a/tests/reserved_subnet.sh
+++ b/tests/reserved_subnet.sh
@@ -32,6 +32,8 @@
pass() {
echo "Hooray!"
+ set +x #echo off
+ exit 0
}
# Use this to trigger fail() at the right places
@@ -57,7 +59,7 @@ echo "Create Congress policy 'test'"
if [[ $(openstack congress policy show test | awk "/ id / { print \$4 }") ]]; then unclean; fi
openstack congress policy create test
-echo "Create reserved_subnet_error rule in policy 'test'"
+echo "Create reserved_subnet_error rules in policy 'test'"
openstack congress policy rule create test "reserved_subnet_error(x) :- neutronv2:subnets(id=x, cidr='10.7.1.0/24')" --name rsv_subnet_adm
openstack congress policy rule create test "reserved_subnet_error(x) :- neutronv2:subnets(id=x, cidr='10.7.12.0/24')" --name rsv_subnet_prv
openstack congress policy rule create test "reserved_subnet_error(x) :- neutronv2:subnets(id=x, cidr='10.7.13.0/24')" --name rsv_subnet_stg
@@ -88,6 +90,7 @@ echo "Verify test_public subnet ID is in the Congress policy 'test' table 'reser
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ openstack congress policy row list test reserved_subnet_error
test_public_ID=$(openstack congress policy row list test reserved_subnet_error | awk "/ $test_public_SUBNET / { print \$2 }")
if [ "$test_public_SUBNET" == "$test_public_ID" ]; then RESULT="Test Success!"
fi
@@ -101,6 +104,7 @@ echo "Verify test_internal subnet ID is in the Congress policy 'test' table 'res
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ openstack congress policy row list test reserved_subnet_error
test_internal_ID=$(openstack congress policy row list test reserved_subnet_error | awk "/ $test_internal_SUBNET / { print \$2 }")
if [ "$test_internal_SUBNET" == "$test_internal_ID" ]; then RESULT="Test Success!"
fi
@@ -117,6 +121,7 @@ echo "Verify test_internal subnet is deleted"
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ neutron subnet-list
test_internal_ID=$(neutron subnet-list | awk "/ test_internal / { print \$2 }")
if [ "$test_internal_SUBNET" != "$test_internal_ID" ]; then RESULT="Test Success!"
fi
@@ -130,6 +135,7 @@ echo "Verify test_public subnet is deleted"
COUNTER=5
RESULT="Test Failed!"
until [[ $COUNTER -eq 0 || $RESULT == "Test Success!" ]]; do
+ neutron subnet-list
test_public_ID=$(neutron subnet-list | awk "/ test_public / { print \$2 }")
if [ "$test_public_SUBNET" != "$test_public_ID" ]; then RESULT="Test Success!"
fi
@@ -139,4 +145,3 @@ done
echo "Verify test_public subnet is deleted:" $RESULT
if [ "$RESULT" == "Test Failed!" ]; then fail; fi
pass
-set +x #echo off
diff --git a/tests/smtp_ingress.sh b/tests/smtp_ingress.sh
index a800ca2..9497276 100644
--- a/tests/smtp_ingress.sh
+++ b/tests/smtp_ingress.sh
@@ -31,13 +31,15 @@
pass() {
echo "Hooray!"
+ set +x #echo off
+ exit 0
}
# Use this to trigger fail() at the right places
# if [ "$RESULT" == "Test Failed!" ]; then fail; fi
fail() {
echo "Test Failed!"
- set +x
+ set +x #echo off
exit 1
}
@@ -105,9 +107,6 @@ neutron security-group-rule-create --direction ingress --protocol=TCP --port-ran
echo "Boot cirros1 with smtp_ingress security group"
nova boot --flavor m1.tiny --image cirros-0.3.3-x86_64 --nic net-id=$test_internal_NET --security-groups smtp_ingress cirros1
-echo "Wait 30 seconds for Congress polling to occur at least once"
-sleep 30
-
echo "Get cirros1 instance ID"
test_cirros1_ID=$(openstack server list | awk "/ cirros1 / { print \$2 }")
@@ -115,7 +114,7 @@ echo "Verify cirros1 is in the Congress policy 'test' table 'smtp_ingress'"
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 'smtp_ingress'"
+ openstack congress policy row list test smtp_ingress
cirros1_ID=$(openstack congress policy row list test smtp_ingress | awk "/ $test_cirros1_ID / { print \$2 }")
if [ "$cirros1_ID" == "$test_cirros1_ID" ]; then RESULT="Test Success!"
fi
@@ -125,4 +124,3 @@ done
echo $RESULT
if [ "$RESULT" == "Test Failed!" ]; then fail; fi
pass
-set +x #echo off