From 2b56065d82fa7cdb7063ff48933643f9aa994881 Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Fri, 9 Sep 2016 15:59:16 +0300 Subject: Refactoring - Wrap common methods that use globals in a Class `get_ping_status` and `add_to_summary` depended on globals for statefulness. The easiest way to refactor them was to convert them into methods and the globals they used into instance variables. - Move `generate_userdata_common` and `generate_userdata_with_ssh` to the utils module. - Make flavor a kwarg in create_instance. Add a defaults section in config.yaml with flavor. This value is used if flavor is not passed via kwargs. - Substitute some sleeps with `wait_for_instances_up` which will wait until a dhcp lease success message appears in the instance's log. - Add functions that wait until router and network association is completed. These do not replace the sleeps but make the tests more deterministic. - Remove unused ping_timeout from config.yaml Change-Id: Ia68ebf47aaa5a58c4e20267f1476db626f015a7c Signed-off-by: Romanos Skiadas Co-Authored-by: George Paraskevopoulos --- test/functest/config.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/functest/config.yaml') diff --git a/test/functest/config.yaml b/test/functest/config.yaml index 93f3552..d91c6ff 100644 --- a/test/functest/config.yaml +++ b/test/functest/config.yaml @@ -1,3 +1,6 @@ +defaults: + flavor: m1.tiny # adapt to your environment + testcases: tempest: enabled: true @@ -11,8 +14,6 @@ testcases: description: VPN provides connectivity between subnets succes_criteria: 75 # we let fail 25% of the subtests testname_db: functest_testcase_1 - ping_timeout: 200 - flavor: m1.tiny # adapt to your environment instance_1_name: sdnvpn-1-1 instance_2_name: sdnvpn-1-2 instance_3_name: sdnvpn-1-3 @@ -37,8 +38,6 @@ testcases: description: Tenant separation succes_criteria: 100 # all the subtests must pass testname_db: functest_testcase_2 - ping_timeout: 200 - flavor: m1.tiny # adapt to your environment instance_1_name: sdnvpn-2-1 instance_2_name: sdnvpn-2-2 instance_3_name: sdnvpn-2-3 @@ -73,8 +72,6 @@ testcases: description: VPN provides connectivity between subnets using router association succes_criteria: 75 # we let fail 25% of the subtests testname_db: functest_testcase_4 - ping_timeout: 200 - flavor: m1.tiny # adapt to your environment instance_1_name: sdnvpn-4-1 instance_2_name: sdnvpn-4-2 instance_3_name: sdnvpn-4-3 @@ -93,4 +90,3 @@ testcases: sdnvpn_sg_descr: Security group for SDNVPN test cases targets1: '88:88' targets2: '55:55' - -- cgit 1.2.3-korg