summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-04-05 02:08:54 +0000
committerLinda Wang <wangwulin@huawei.com>2017-04-05 02:34:49 +0000
commitcc9ed6dfc7b5ae5ffc07288cdaf3f98c40252746 (patch)
tree835137c373900e962a588b5ec39ed8cf629d7540
parentdb9767d6871b3601265b46645d2ff7656f3a0bb4 (diff)
Bugfix: Add case_name as constructor arg for snaps and rally
When running healthcheck tier and rally, it complains " __init__() got an unexpected keyword argument 'case_name'" Change-Id: I078094921f08b457b88beabee60eabf40b657411 Signed-off-by: Linda Wang <wangwulin@huawei.com>
-rw-r--r--functest/core/pytest_suite_runner.py4
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py10
-rw-r--r--functest/opnfv_tests/openstack/snaps/api_check.py5
-rw-r--r--functest/opnfv_tests/openstack/snaps/connection_check.py5
-rw-r--r--functest/opnfv_tests/openstack/snaps/health_check.py5
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py4
6 files changed, 14 insertions, 19 deletions
diff --git a/functest/core/pytest_suite_runner.py b/functest/core/pytest_suite_runner.py
index 4f777628a..9cfaea7ae 100644
--- a/functest/core/pytest_suite_runner.py
+++ b/functest/core/pytest_suite_runner.py
@@ -15,8 +15,8 @@ class PyTestSuiteRunner(base.TestCase):
This superclass is designed to execute pre-configured unittest.TestSuite()
objects
"""
- def __init__(self):
- super(PyTestSuiteRunner, self).__init__()
+ def __init__(self, case_name=''):
+ super(PyTestSuiteRunner, self).__init__(case_name)
self.suite = None
def run(self, **kwargs):
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 1fe6143e1..e7411c51d 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -536,9 +536,8 @@ class RallyBase(testcase.TestCase):
class RallySanity(RallyBase):
- def __init__(self):
- super(RallySanity, self).__init__()
- self.case_name = 'rally_sanity'
+ def __init__(self, case_name="rally_sanity"):
+ super(RallySanity, self).__init__(case_name)
self.mode = 'sanity'
self.test_name = 'all'
self.smoke = True
@@ -546,9 +545,8 @@ class RallySanity(RallyBase):
class RallyFull(RallyBase):
- def __init__(self):
- super(RallyFull, self).__init__()
- self.case_name = 'rally_full'
+ def __init__(self, case_name="rally_full"):
+ super(RallyFull, self).__init__(case_name)
self.mode = 'full'
self.test_name = 'all'
self.smoke = False
diff --git a/functest/opnfv_tests/openstack/snaps/api_check.py b/functest/opnfv_tests/openstack/snaps/api_check.py
index ad77d9be3..dea1ca759 100644
--- a/functest/opnfv_tests/openstack/snaps/api_check.py
+++ b/functest/opnfv_tests/openstack/snaps/api_check.py
@@ -20,11 +20,10 @@ class ApiCheck(SnapsTestRunner):
that exercise many of the OpenStack APIs within Keystone, Glance, Neutron,
and Nova
"""
- def __init__(self):
- super(ApiCheck, self).__init__()
+ def __init__(self, case_name="api_check"):
+ super(ApiCheck, self).__init__(case_name)
self.suite = unittest.TestSuite()
- self.case_name = "api_check"
test_suite_builder.add_openstack_api_tests(
self.suite,
diff --git a/functest/opnfv_tests/openstack/snaps/connection_check.py b/functest/opnfv_tests/openstack/snaps/connection_check.py
index 0637bcfb3..57b74d4c2 100644
--- a/functest/opnfv_tests/openstack/snaps/connection_check.py
+++ b/functest/opnfv_tests/openstack/snaps/connection_check.py
@@ -20,11 +20,10 @@ class ConnectionCheck(SnapsTestRunner):
that simply obtain the different OpenStack clients and may perform
simple queries
"""
- def __init__(self):
- super(ConnectionCheck, self).__init__()
+ def __init__(self, case_name="connection_check"):
+ super(ConnectionCheck, self).__init__(case_name)
self.suite = unittest.TestSuite()
- self.case_name = "connection_check"
test_suite_builder.add_openstack_client_tests(
self.suite,
diff --git a/functest/opnfv_tests/openstack/snaps/health_check.py b/functest/opnfv_tests/openstack/snaps/health_check.py
index 8fece7465..6b3cfdd0d 100644
--- a/functest/opnfv_tests/openstack/snaps/health_check.py
+++ b/functest/opnfv_tests/openstack/snaps/health_check.py
@@ -21,11 +21,10 @@ class HealthCheck(SnapsTestRunner):
creates a VM with a single port with an IPv4 address that is assigned by
DHCP. This test then validates the expected IP with the actual
"""
- def __init__(self):
- super(HealthCheck, self).__init__()
+ def __init__(self, case_name="snaps_health_check"):
+ super(HealthCheck, self).__init__(case_name)
self.suite = unittest.TestSuite()
- self.case_name = "snaps_health_check"
image_custom_config = None
if hasattr(CONST, 'snaps_health_check'):
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 9d723905f..044a0bb04 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -19,8 +19,8 @@ class SnapsTestRunner(PyTestSuiteRunner):
creates a VM with a single port with an IPv4 address that is assigned by
DHCP. This test then validates the expected IP with the actual
"""
- def __init__(self):
- super(SnapsTestRunner, self).__init__()
+ def __init__(self, case_name=''):
+ super(SnapsTestRunner, self).__init__(case_name)
self.ext_net_name = snaps_utils.get_ext_net_name()
self.logger = ft_logger.Logger(self.project_name).getLogger()