summaryrefslogtreecommitdiffstats
path: root/testcases/tests
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-05-04 16:57:36 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-05-04 17:09:58 +0200
commitcd42c5ba41d08ed6d378aa78ccdabbb51569f739 (patch)
treeecf371f3b7bb51c1e596e3a1a1af6385a1a02cbb /testcases/tests
parent6790e17eb7c1a3eaaccfe97ac90932e3c15eea6d (diff)
Refactor, add logger handler to collect all the logs to a file as well
JIRA: FUNCTEST-190 Also: - remove old code that are not used any more - improve execute_command function - fix logger output for run_tempest Change-Id: Ib268738ada1b9de2a418ef01e684a90e6f4e02ed Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/tests')
-rw-r--r--testcases/tests/TestFunctestUtils.py97
1 files changed, 0 insertions, 97 deletions
diff --git a/testcases/tests/TestFunctestUtils.py b/testcases/tests/TestFunctestUtils.py
deleted file mode 100644
index 4e06b3e48..000000000
--- a/testcases/tests/TestFunctestUtils.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-
-import os
-import unittest
-import yaml
-from functest_utils import getTestEnv, isTestRunnable, generateTestcaseList
-
-
-class TestFunctestUtils(unittest.TestCase):
-
- def setUp(self):
- os.environ["INSTALLER_TYPE"] = "fuel"
- os.environ["DEPLOY_SCENARIO"] = "os-odl_l3-ovs-ha"
-
- global functest_yaml
-
- 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, {'scenario': 'ocl'})
-
- env_test = getTestEnv('doctor', functest_yaml)
- self.assertEqual(env_test, {'installer': 'fuel'})
-
- env_test = getTestEnv('promise', functest_yaml)
- self.assertEqual(env_test, {'installer': '(fuel)|(joid)'})
-
- env_test = getTestEnv('functest/tempest', functest_yaml)
- self.assertEqual(env_test, None)
-
- env_test = getTestEnv('functest/vims', functest_yaml)
- self.assertEqual(env_test, None)
-
- env_test = getTestEnv('functest/odl', functest_yaml)
- self.assertEqual(env_test, {'scenario': 'odl'})
-
- env_test = getTestEnv('functest/onos', functest_yaml)
- self.assertEqual(env_test, {'scenario': 'onos'})
-
- env_test = getTestEnv('policy-test', functest_yaml)
- self.assertEqual(env_test, {'scenario': 'odl'})
-
- env_test = getTestEnv('foo', functest_yaml)
- self.assertEqual(env_test, '')
-
- def test_isTestRunnable(self):
-
- test = isTestRunnable('ovno', functest_yaml)
- self.assertFalse(test)
-
- test = isTestRunnable('doctor', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('promise', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/onos', functest_yaml)
- self.assertFalse(test)
-
- test = isTestRunnable('functest/odl', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/vping_ssh', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/vping_userdata', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/tempest', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/rally', functest_yaml)
- self.assertTrue(test)
-
- test = isTestRunnable('functest/vims', functest_yaml)
- self.assertTrue(test)
-
- def test_generateTestcaseList(self):
-
- test = generateTestcaseList(functest_yaml)
-
- expected_list = ("vping_ssh vping_userdata 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["DEPLOY_SCENARIO"] = ""
-
-
-if __name__ == '__main__':
- unittest.main()