aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2019-02-08 18:56:16 +0200
committerStamatis Katsaounis <mokats@intracom-telecom.com>2019-02-13 16:23:12 +0200
commitd0cb38d7ad5046700564f2700df9b8c92706b32c (patch)
tree50f5efa3e53738295ae099590b93357fef4f2a07 /functest/tests
parent2df7a0728d687de9a24d8432ef30bbd2ecd771c8 (diff)
Specify which rally tests to run
This patch adds the ability to specify which rally test to run by setting the appropriate configuration value. Change-Id: I6cbc9d12aada4f8eab68d2219d94ae1391a79021 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/openstack/rally/test_rally.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py
index fa307be24..0a605dd4c 100644
--- a/functest/tests/unit/openstack/rally/test_rally.py
+++ b/functest/tests/unit/openstack/rally/test_rally.py
@@ -32,7 +32,6 @@ class OSRallyTesting(unittest.TestCase):
self.rally_base.image = munch.Munch(name='foo')
self.rally_base.flavor = munch.Munch(name='foo')
self.rally_base.flavor_alt = munch.Munch(name='bar')
- self.rally_base.test_name = 'all'
self.assertTrue(mock_get_config.called)
self.assertTrue(mock_shade.called)
self.assertTrue(mock_new_project.called)
@@ -264,9 +263,8 @@ class OSRallyTesting(unittest.TestCase):
def test_prepare_run_testname_invalid(self):
self.rally_base.TESTS = ['test1', 'test2']
- self.rally_base.test_name = 'test'
with self.assertRaises(Exception):
- self.rally_base.prepare_run()
+ self.rally_base.prepare_run(tests=['test'])
@mock.patch('functest.opnfv_tests.openstack.rally.rally.os.path.exists')
@mock.patch('functest.opnfv_tests.openstack.rally.rally.shutil.copyfile')
@@ -275,14 +273,13 @@ class OSRallyTesting(unittest.TestCase):
def test_prepare_run_flavor_alt_creation_failed(self, *args):
# pylint: disable=unused-argument
self.rally_base.TESTS = ['test1', 'test2']
- self.rally_base.test_name = 'test1'
with mock.patch.object(self.rally_base.cloud,
'list_hypervisors') as mock_list_hyperv, \
mock.patch.object(self.rally_base, 'create_flavor_alt',
side_effect=Exception) \
as mock_create_flavor:
with self.assertRaises(Exception):
- self.rally_base.prepare_run()
+ self.rally_base.prepare_run(tests=['test1'])
mock_list_hyperv.assert_called_once()
mock_create_flavor.assert_called_once()
@@ -292,7 +289,6 @@ class OSRallyTesting(unittest.TestCase):
'run_task')
def test_run_tests_all(self, mock_run_task, mock_prepare_task):
self.rally_base.tests = ['test1', 'test2']
- self.rally_base.test_name = 'all'
self.rally_base.run_tests()
mock_prepare_task.assert_any_call('test1')
mock_prepare_task.assert_any_call('test2')