diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functest/config.yaml | 4 | ||||
-rw-r--r-- | test/functest/run_tests.py | 12 | ||||
-rw-r--r-- | test/functest/testcase_2.py | 28 |
3 files changed, 23 insertions, 21 deletions
diff --git a/test/functest/config.yaml b/test/functest/config.yaml index dc949fb..d075c77 100644 --- a/test/functest/config.yaml +++ b/test/functest/config.yaml @@ -66,6 +66,8 @@ testcases: secgroup_descr: Security group for SDNVPN test cases targets1: '88:88' targets2: '55:55' + route_distinguishers1: '111:111' + route_distinguishers2: '222:222' testcase_3: enabled: false @@ -74,7 +76,7 @@ testcases: testname_db: functest_testcase_3 testcase_4: - enabled: false + enabled: true description: VPN provides connectivity between subnets using router association success_criteria: 75 # we let fail 25% of the subtests testname_db: functest_testcase_4 diff --git a/test/functest/run_tests.py b/test/functest/run_tests.py index cb46f00..e05cd7f 100644 --- a/test/functest/run_tests.py +++ b/test/functest/run_tests.py @@ -47,9 +47,7 @@ def main(): config_yaml = yaml.safe_load(f) testcases = config_yaml.get("testcases") - overall_details = {} overall_status = "PASS" - overall_start_time = time.time() for testcase in testcases: if testcases[testcase]['enabled']: test_name = testcase @@ -63,11 +61,9 @@ def main(): start_time = time.time() result = t.main() end_time = time.time() - duration = end_time - start_time if result < 0: status = "FAIL" overall_status = "FAIL" - overall_details.update({test_name_db: "execution error."}) else: status = result.get("status") details = result.get("details") @@ -77,18 +73,10 @@ def main(): if status == "FAIL": overall_status = "FAIL" - dic = {"duration": duration, "status": status} - overall_details.update({test_name_db: dic}) if args.report: push_results( test_name_db, start_time, end_time, status, details) - overall_end_time = time.time() - if args.report: - push_results( - "bgpvpn", overall_start_time, overall_end_time, - overall_status, overall_details) - if overall_status == "FAIL": sys.exit(-1) diff --git a/test/functest/testcase_2.py b/test/functest/testcase_2.py index d1f7001..e8b8048 100644 --- a/test/functest/testcase_2.py +++ b/test/functest/testcase_2.py @@ -57,23 +57,33 @@ def main(): disk=COMMON_CONFIG.image_format, container="bare", public=True) - network_1_id, _, _ = test_utils.create_network( + network_1_id = test_utils.create_net( + neutron_client, + TESTCASE_CONFIG.net_1_name) + test_utils.create_subnet( neutron_client, - TESTCASE_CONFIG.net_1_name, TESTCASE_CONFIG.subnet_1a_name, TESTCASE_CONFIG.subnet_1a_cidr, - TESTCASE_CONFIG.router_1_name, + network_1_id) + test_utils.create_subnet( + neutron_client, TESTCASE_CONFIG.subnet_1b_name, - TESTCASE_CONFIG.subnet_1b_cidr) + TESTCASE_CONFIG.subnet_1b_cidr, + network_1_id) - network_2_id, _, _ = test_utils.create_network( + network_2_id = test_utils.create_net( + neutron_client, + TESTCASE_CONFIG.net_2_name) + test_utils.create_subnet( neutron_client, - TESTCASE_CONFIG.net_2_name, TESTCASE_CONFIG.subnet_2a_name, TESTCASE_CONFIG.subnet_2a_cidr, - TESTCASE_CONFIG.router_2_name, + network_2_id) + test_utils.create_subnet( + neutron_client, TESTCASE_CONFIG.subnet_2b_name, - TESTCASE_CONFIG.subnet_2b_cidr) + TESTCASE_CONFIG.subnet_2b_cidr, + network_2_id) sg_id = os_utils.create_security_group_full(neutron_client, TESTCASE_CONFIG.secgroup_name, @@ -167,6 +177,7 @@ def main(): kwargs = {"import_targets": TESTCASE_CONFIG.targets2, "export_targets": TESTCASE_CONFIG.targets2, "route_targets": TESTCASE_CONFIG.targets2, + "route_distinguishers": TESTCASE_CONFIG.route_distinguishers1, "name": vpn1_name} bgpvpn1 = os_utils.create_bgpvpn(neutron_client, **kwargs) bgpvpn1_id = bgpvpn1['bgpvpn']['id'] @@ -214,6 +225,7 @@ def main(): kwargs = {"import_targets": TESTCASE_CONFIG.targets1, "export_targets": TESTCASE_CONFIG.targets1, "route_targets": TESTCASE_CONFIG.targets1, + "route_distinguishers": TESTCASE_CONFIG.route_distinguishers2, "name": vpn2_name} bgpvpn2 = os_utils.create_bgpvpn(neutron_client, **kwargs) bgpvpn2_id = bgpvpn2['bgpvpn']['id'] |