Merge "Migrate cli tests to resource_* fixtures"
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index c33589a..ca6d7fe 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -94,11 +94,11 @@
class ClientTestBase(tempest.test.BaseTestCase):
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.cli.enabled:
msg = "cli testing disabled"
raise cls.skipException(msg)
- super(ClientTestBase, cls).setUpClass()
+ super(ClientTestBase, cls).resource_setup()
def __init__(self, *args, **kwargs):
self.parser = tempest.cli.output_parser
diff --git a/tempest/cli/simple_read_only/compute/test_nova.py b/tempest/cli/simple_read_only/compute/test_nova.py
index 9bac7a6..6e5e077 100644
--- a/tempest/cli/simple_read_only/compute/test_nova.py
+++ b/tempest/cli/simple_read_only/compute/test_nova.py
@@ -41,11 +41,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.nova:
msg = ("%s skipped as Nova is not available" % cls.__name__)
raise cls.skipException(msg)
- super(SimpleReadOnlyNovaClientTest, cls).setUpClass()
+ super(SimpleReadOnlyNovaClientTest, cls).resource_setup()
def test_admin_fake_action(self):
self.assertRaises(exceptions.CommandFailed,
diff --git a/tempest/cli/simple_read_only/compute/test_nova_manage.py b/tempest/cli/simple_read_only/compute/test_nova_manage.py
index a4c7aa1..cff543f 100644
--- a/tempest/cli/simple_read_only/compute/test_nova_manage.py
+++ b/tempest/cli/simple_read_only/compute/test_nova_manage.py
@@ -36,7 +36,7 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.nova:
msg = ("%s skipped as Nova is not available" % cls.__name__)
raise cls.skipException(msg)
@@ -44,7 +44,7 @@
msg = ("%s skipped as *-manage commands not available"
% cls.__name__)
raise cls.skipException(msg)
- super(SimpleReadOnlyNovaManageTest, cls).setUpClass()
+ super(SimpleReadOnlyNovaManageTest, cls).resource_setup()
def test_admin_fake_action(self):
self.assertRaises(exceptions.CommandFailed,
diff --git a/tempest/cli/simple_read_only/data_processing/test_sahara.py b/tempest/cli/simple_read_only/data_processing/test_sahara.py
index 2c6e0e2..751a4ad 100644
--- a/tempest/cli/simple_read_only/data_processing/test_sahara.py
+++ b/tempest/cli/simple_read_only/data_processing/test_sahara.py
@@ -34,11 +34,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.sahara:
msg = "Skipping all Sahara cli tests because it is not available"
raise cls.skipException(msg)
- super(SimpleReadOnlySaharaClientTest, cls).setUpClass()
+ super(SimpleReadOnlySaharaClientTest, cls).resource_setup()
@test.attr(type='negative')
def test_sahara_fake_action(self):
diff --git a/tempest/cli/simple_read_only/image/test_glance.py b/tempest/cli/simple_read_only/image/test_glance.py
index 2fd8212..a9cbadb 100644
--- a/tempest/cli/simple_read_only/image/test_glance.py
+++ b/tempest/cli/simple_read_only/image/test_glance.py
@@ -34,11 +34,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.glance:
msg = ("%s skipped as Glance is not available" % cls.__name__)
raise cls.skipException(msg)
- super(SimpleReadOnlyGlanceClientTest, cls).setUpClass()
+ super(SimpleReadOnlyGlanceClientTest, cls).resource_setup()
def test_glance_fake_action(self):
self.assertRaises(exceptions.CommandFailed,
diff --git a/tempest/cli/simple_read_only/network/test_neutron.py b/tempest/cli/simple_read_only/network/test_neutron.py
index 87f6b67..f9f8906 100644
--- a/tempest/cli/simple_read_only/network/test_neutron.py
+++ b/tempest/cli/simple_read_only/network/test_neutron.py
@@ -35,11 +35,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if (not CONF.service_available.neutron):
msg = "Skipping all Neutron cli tests because it is not available"
raise cls.skipException(msg)
- super(SimpleReadOnlyNeutronClientTest, cls).setUpClass()
+ super(SimpleReadOnlyNeutronClientTest, cls).resource_setup()
@test.attr(type='smoke')
def test_neutron_fake_action(self):
diff --git a/tempest/cli/simple_read_only/object_storage/test_swift.py b/tempest/cli/simple_read_only/object_storage/test_swift.py
index 069a384..a162660 100644
--- a/tempest/cli/simple_read_only/object_storage/test_swift.py
+++ b/tempest/cli/simple_read_only/object_storage/test_swift.py
@@ -31,11 +31,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.swift:
msg = ("%s skipped as Swift is not available" % cls.__name__)
raise cls.skipException(msg)
- super(SimpleReadOnlySwiftClientTest, cls).setUpClass()
+ super(SimpleReadOnlySwiftClientTest, cls).resource_setup()
def test_swift_fake_action(self):
self.assertRaises(exceptions.CommandFailed,
diff --git a/tempest/cli/simple_read_only/orchestration/test_heat.py b/tempest/cli/simple_read_only/orchestration/test_heat.py
index 430cdf1..7d7f8c9 100644
--- a/tempest/cli/simple_read_only/orchestration/test_heat.py
+++ b/tempest/cli/simple_read_only/orchestration/test_heat.py
@@ -32,12 +32,12 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if (not CONF.service_available.heat):
msg = ("Skipping all Heat cli tests because it is "
"not available")
raise cls.skipException(msg)
- super(SimpleReadOnlyHeatClientTest, cls).setUpClass()
+ super(SimpleReadOnlyHeatClientTest, cls).resource_setup()
cls.heat_template_path = os.path.join(os.path.dirname(
os.path.dirname(os.path.realpath(__file__))),
'heat_templates/heat_minimal.yaml')
diff --git a/tempest/cli/simple_read_only/telemetry/test_ceilometer.py b/tempest/cli/simple_read_only/telemetry/test_ceilometer.py
index 1d2822d..45b793b 100644
--- a/tempest/cli/simple_read_only/telemetry/test_ceilometer.py
+++ b/tempest/cli/simple_read_only/telemetry/test_ceilometer.py
@@ -32,12 +32,12 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if (not CONF.service_available.ceilometer):
msg = ("Skipping all Ceilometer cli tests because it is "
"not available")
raise cls.skipException(msg)
- super(SimpleReadOnlyCeilometerClientTest, cls).setUpClass()
+ super(SimpleReadOnlyCeilometerClientTest, cls).resource_setup()
def test_ceilometer_meter_list(self):
self.ceilometer('meter-list')
diff --git a/tempest/cli/simple_read_only/volume/test_cinder.py b/tempest/cli/simple_read_only/volume/test_cinder.py
index e44a577..45f6c41 100644
--- a/tempest/cli/simple_read_only/volume/test_cinder.py
+++ b/tempest/cli/simple_read_only/volume/test_cinder.py
@@ -35,11 +35,11 @@
"""
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.cinder:
msg = ("%s skipped as Cinder is not available" % cls.__name__)
raise cls.skipException(msg)
- super(SimpleReadOnlyCinderClientTest, cls).setUpClass()
+ super(SimpleReadOnlyCinderClientTest, cls).resource_setup()
def test_cinder_fake_action(self):
self.assertRaises(exceptions.CommandFailed,