summaryrefslogtreecommitdiffstats
path: root/testcases/tests/TestFunctestUtils.py
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/tests/TestFunctestUtils.py')
-rw-r--r--testcases/tests/TestFunctestUtils.py41
1 files changed, 15 insertions, 26 deletions
diff --git a/testcases/tests/TestFunctestUtils.py b/testcases/tests/TestFunctestUtils.py
index 46da50cb8..6f12e603d 100644
--- a/testcases/tests/TestFunctestUtils.py
+++ b/testcases/tests/TestFunctestUtils.py
@@ -11,25 +11,24 @@ class TestFunctestUtils(unittest.TestCase):
def setUp(self):
os.environ["INSTALLER_TYPE"] = "fuel"
- os.environ["SDN_CONTROLLER"] = "odl"
- os.environ["OPNFV_FEATURE"] = "ovs2.4"
+ os.environ["DEPLOY_SCENARIO"] = "os-odl_l3-ovs-ha"
global functest_yaml
- with open("/home/opnfv/functest/conf/config_functest.yaml") as f:
+ with open("../config_functest.yaml") as f:
functest_yaml = yaml.safe_load(f)
f.close()
def test_getTestEnv(self):
env_test = getTestEnv('ovno', functest_yaml)
- self.assertEqual(env_test, {'controller': 'opencontrail'})
+ self.assertEqual(env_test, {'scenario': 'ocl'})
env_test = getTestEnv('doctor', functest_yaml)
- self.assertEqual(env_test, None)
+ self.assertEqual(env_test, {'installer': 'fuel'})
env_test = getTestEnv('promise', functest_yaml)
- self.assertEqual(env_test, None)
+ self.assertEqual(env_test, {'installer': '(fuel)|(joid)'})
env_test = getTestEnv('functest/tempest', functest_yaml)
self.assertEqual(env_test, None)
@@ -38,30 +37,22 @@ class TestFunctestUtils(unittest.TestCase):
self.assertEqual(env_test, None)
env_test = getTestEnv('functest/odl', functest_yaml)
- self.assertEqual(env_test, {'controller': 'odl'})
+ self.assertEqual(env_test, {'scenario': 'odl'})
env_test = getTestEnv('functest/onos', functest_yaml)
- self.assertEqual(env_test, {'controller': 'onos'})
-
- env_test = getTestEnv('functest/onos-ovsdb', functest_yaml)
- self.assertEqual(env_test, {'controller': 'onos'})
+ self.assertEqual(env_test, {'scenario': 'onos'})
env_test = getTestEnv('policy-test', functest_yaml)
- self.assertEqual(env_test, {'controller': 'odl'})
+ self.assertEqual(env_test, {'scenario': 'odl'})
env_test = getTestEnv('sdnvpn/odl-vpn_service-tests', functest_yaml)
self.assertEqual(env_test,
- {'controller': 'odl', 'scenario': 'os_ovh_ha'})
+ {'installer': 'fuel', 'scenario': '(ovs)*(odl)'})
env_test = getTestEnv('sdnvpn/opnfv-yardstick-tc026-sdnvpn',
functest_yaml)
self.assertEqual(env_test,
- {'controller': 'nosdn', 'scenario': 'os_ovh_ha'})
-
- env_test = getTestEnv('sdnvpn/openstack-neutron-bgpvpn-api-extension-tests',
- functest_yaml)
- self.assertEqual(env_test,
- {'controller': 'nosdn', 'scenario': 'os_ovh_ha'})
+ {'installer': 'fuel', 'scenario': '(ovs)*(nosdn)'})
env_test = getTestEnv('foo', functest_yaml)
self.assertEqual(env_test, '')
@@ -106,17 +97,15 @@ class TestFunctestUtils(unittest.TestCase):
def test_generateTestcaseList(self):
test = generateTestcaseList(functest_yaml)
- test = sorted(test.split(' '))
- expected_list = "doctor vims odl rally vping tempest promise policy-test odl-vpn_service-tests "
- expected_list_array = sorted(expected_list.split(' '))
-
- self.assertEqual(test, expected_list_array)
+
+ expected_list = "vping tempest odl doctor promise policy-test odl-vpn_service-tests vims rally "
+ self.assertEqual(test, expected_list)
def tearDown(self):
os.environ["INSTALLER_TYPE"] = ""
- os.environ["SDN_CONTROLLER"] = ""
- os.environ["OPNFV_FEATURE"] = ""
+ os.environ["DEPLOY_SCENARIO"] = ""
if __name__ == '__main__':
unittest.main()
+