From ab21527a962b5e4af66d1512d2ee2b43de444bf1 Mon Sep 17 00:00:00 2001 From: MatthewLi Date: Wed, 3 May 2017 23:12:53 -0400 Subject: vpn testcases added in proposed_tests JIRA: DOVETAIL-212 after communicating with Tim/jose, help to add vpn testcase into proposed_tests reference: https://wiki.opnfv.org/display/sdnvpn/SDNVPN+Testing#SDNVPNTesting-TestcompliancetemplateforDovetail Change-Id: Id34a2cadba625abbdbc59ef11affeccba24fa10c Signed-off-by: MatthewLi --- dovetail/container.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'dovetail/container.py') diff --git a/dovetail/container.py b/dovetail/container.py index 5c128c0b..ae7c8e2e 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -59,12 +59,19 @@ class Container(object): # set functest envs and TEST_DB_URL for creating functest container @staticmethod - def set_functest_config(): + def set_functest_config(testcase_name): # These are all just used by Functest's function push_results_to_db. # And has nothing to do with DoveTail running test cases. - ins_type = " -e INSTALLER_TYPE=unknown" - scenario = " -e DEPLOY_SCENARIO=unknown" + ins_type = os.getenv('INSTALLER_TYPE', "unknown") + scenario = os.getenv('DEPLOY_SCENARIO', "unknown") + ins_type = ''.join([" -e INSTALLER_TYPE=", ins_type]) + scenario = ''.join([" -e DEPLOY_SCENARIO=", scenario]) + # vpn testcase only runs when scenario name includes bgpvpn + # functest requirements + if 'sdnvpn' in testcase_name: + ins_type = "-e INSTALLER_TYPE=netvirt" + scenario = " -e DEPLOY_SCENARIO=bgpvpn" node = " -e NODE_NAME=master" envs = "%s %s %s" % (ins_type, scenario, node) @@ -122,7 +129,7 @@ class Container(object): config = "" if type.lower() == "functest": - config = cls.set_functest_config() + config = cls.set_functest_config(testcase_name) if type.lower() == "yardstick": config = cls.set_yardstick_config() if not config: -- cgit 1.2.3-korg