diff options
Diffstat (limited to 'test/functest/testcase_4.py')
-rw-r--r-- | test/functest/testcase_4.py | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/test/functest/testcase_4.py b/test/functest/testcase_4.py index bb25cce..61d8c97 100644 --- a/test/functest/testcase_4.py +++ b/test/functest/testcase_4.py @@ -132,11 +132,9 @@ def main(): secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_1, userdata=u1) - vm_1_ip = vm_1.networks.itervalues().next()[0] msg = ("Create VPN with eRT<>iRT") - logger.info(msg) - results.add_to_summary(1, msg) + results.record_action(msg) vpn_name = "sdnvpn-" + str(randint(100000, 999999)) kwargs = {"import_targets": TESTCASE_CONFIG.targets1, "export_targets": TESTCASE_CONFIG.targets2, @@ -147,8 +145,7 @@ def main(): logger.debug("VPN created details: %s" % bgpvpn) msg = ("Associate router '%s' to the VPN." % TESTCASE_CONFIG.router_1_name) - logger.info(msg) - results.add_to_summary(1, msg) + results.record_action(msg) results.add_to_summary(0, "-") os_utils.create_router_association( @@ -163,20 +160,13 @@ def main(): logger.error("One or more instances is down") # TODO Handle appropriately - # Ping from VM1 to VM2 should work - results.get_ping_status(vm_1, vm_1_ip, vm_2, vm_2_ip, - expected="PASS", timeout=200) - # Ping from VM1 to VM3 should work - results.get_ping_status(vm_1, vm_1_ip, vm_3, vm_3_ip, - expected="PASS", timeout=30) - # Ping from VM1 to VM4 should not work - results.get_ping_status(vm_1, vm_1_ip, vm_4, vm_4_ip, - expected="FAIL", timeout=30) + results.get_ping_status(vm_1, vm_2, expected="PASS", timeout=200) + results.get_ping_status(vm_1, vm_3, expected="PASS", timeout=30) + results.get_ping_status(vm_1, vm_4, expected="FAIL", timeout=30) msg = ("Associate network '%s' to the VPN." % TESTCASE_CONFIG.net_2_name) - logger.info(msg) results.add_to_summary(0, "-") - results.add_to_summary(1, msg) + results.record_action(msg) results.add_to_summary(0, "-") os_utils.create_network_association( neutron_client, bgpvpn_id, network_2_id) @@ -190,20 +180,13 @@ def main(): " updated network configuration") test_utils.wait_before_subtest() - # Ping from VM4 to VM5 should work - results.get_ping_status(vm_4, vm_4_ip, vm_5, vm_5_ip, - expected="PASS", timeout=30) - # Ping from VM1 to VM4 should not work - results.get_ping_status(vm_1, vm_1_ip, vm_4, vm_4_ip, - expected="FAIL", timeout=30) - # Ping from VM1 to VM5 should not work - results.get_ping_status(vm_1, vm_1_ip, vm_5, vm_5_ip, - expected="FAIL", timeout=30) + results.get_ping_status(vm_4, vm_5, expected="PASS", timeout=30) + results.get_ping_status(vm_1, vm_4, expected="FAIL", timeout=30) + results.get_ping_status(vm_1, vm_5, expected="FAIL", timeout=30) msg = ("Update VPN with eRT=iRT ...") - logger.info(msg) results.add_to_summary(0, "-") - results.add_to_summary(1, msg) + results.record_action(msg) results.add_to_summary(0, "-") kwargs = {"import_targets": TESTCASE_CONFIG.targets1, "export_targets": TESTCASE_CONFIG.targets1, @@ -214,12 +197,8 @@ def main(): " updated network configuration") test_utils.wait_before_subtest() - # Ping from VM1 to VM4 should work - results.get_ping_status(vm_1, vm_1_ip, vm_4, vm_4_ip, - expected="PASS", timeout=30) - # Ping from VM1 to VM5 should work - results.get_ping_status(vm_1, vm_1_ip, vm_5, vm_5_ip, - expected="PASS", timeout=30) + results.get_ping_status(vm_1, vm_4, expected="PASS", timeout=30) + results.get_ping_status(vm_1, vm_5, expected="PASS", timeout=30) results.add_to_summary(0, "=") logger.info("\n%s" % results.summary) |