Smoke attribute implies gate attribute
The smoke attribute now implies that the gate attribute
be applied as well. This should simplify the attribute
marking and reduce the probability of tests accidentally
not being included in the gate.
Partially implements blueprint set-gate-attribute
Change-Id: Ic273b216d8702c670bfbff60616bf4d07185c3c8
diff --git a/tempest/test.py b/tempest/test.py
index b7f4b9b..c69a94c 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -39,9 +39,13 @@
def decorator(f):
if 'type' in kwargs and isinstance(kwargs['type'], str):
f = testtools.testcase.attr(kwargs['type'])(f)
+ if kwargs['type'] == 'smoke':
+ f = testtools.testcase.attr('gate')(f)
elif 'type' in kwargs and isinstance(kwargs['type'], list):
for attr in kwargs['type']:
f = testtools.testcase.attr(attr)(f)
+ if attr == 'smoke':
+ f = testtools.testcase.attr('gate')(f)
return nose.plugins.attrib.attr(*args, **kwargs)(f)
return decorator
diff --git a/tempest/tests/volume/admin/test_multi_backend.py b/tempest/tests/volume/admin/test_multi_backend.py
index c50586c..93b3b77 100644
--- a/tempest/tests/volume/admin/test_multi_backend.py
+++ b/tempest/tests/volume/admin/test_multi_backend.py
@@ -109,7 +109,7 @@
super(VolumeMultiBackendTest, cls).tearDownClass()
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_multi_backend_enabled(self):
# this test checks that multi backend is enabled for at least the
# computes where the volumes created in setUp were made
diff --git a/tempest/tests/volume/admin/test_volume_types.py b/tempest/tests/volume/admin/test_volume_types.py
index 8fccd24..a35f017 100644
--- a/tempest/tests/volume/admin/test_volume_types.py
+++ b/tempest/tests/volume/admin/test_volume_types.py
@@ -38,7 +38,7 @@
auth_url,
adm_tenant)
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_type_list(self):
# List Volume types.
try:
@@ -48,7 +48,7 @@
except Exception:
self.fail("Could not list volume types")
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_create_get_delete_volume_with_volume_type_and_extra_specs(self):
# Create/get/delete volume with volume_type and extra spec.
try:
@@ -100,7 +100,7 @@
resp, _ = self.client.delete_volume_type(body['id'])
self.assertEqual(202, resp.status)
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_type_create_delete(self):
# Create/Delete volume type.
try:
@@ -123,7 +123,7 @@
except Exception:
self.fail("Could not create a volume_type")
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_type_create_get(self):
# Create/get volume type.
try:
diff --git a/tempest/tests/volume/admin/test_volume_types_extra_specs.py b/tempest/tests/volume/admin/test_volume_types_extra_specs.py
index 85edd64..aeb58c7 100644
--- a/tempest/tests/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/tests/volume/admin/test_volume_types_extra_specs.py
@@ -34,7 +34,7 @@
cls.client.delete_volume_type(cls.volume_type['id'])
super(VolumeTypesExtraSpecsTest, cls).tearDownClass()
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_type_extra_specs_list(self):
# List Volume types extra specs.
try:
@@ -77,7 +77,7 @@
except Exception:
self.fail("Couldnt update volume type extra spec")
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_type_extra_spec_create_get_delete(self):
# Create/Get/Delete volume type extra spec.
try:
diff --git a/tempest/tests/volume/test_volumes_actions.py b/tempest/tests/volume/test_volumes_actions.py
index 5396fa4..8664a7d 100644
--- a/tempest/tests/volume/test_volumes_actions.py
+++ b/tempest/tests/volume/test_volumes_actions.py
@@ -52,7 +52,7 @@
super(VolumesActionsTest, cls).tearDownClass()
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_attach_detach_volume_to_instance(self):
# Volume is attached and detached successfully from an instance
try:
diff --git a/tempest/tests/volume/test_volumes_get.py b/tempest/tests/volume/test_volumes_get.py
index fdaf09b..65748e8 100644
--- a/tempest/tests/volume/test_volumes_get.py
+++ b/tempest/tests/volume/test_volumes_get.py
@@ -105,11 +105,11 @@
self.assertEqual(202, resp.status)
self.client.wait_for_resource_deletion(volume['id'])
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_create_get_delete(self):
self._volume_create_get_delete(image_ref=None)
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_from_image(self):
self._volume_create_get_delete(image_ref=self.config.compute.image_ref)
diff --git a/tempest/tests/volume/test_volumes_list.py b/tempest/tests/volume/test_volumes_list.py
index 2468705..7f5c756 100644
--- a/tempest/tests/volume/test_volumes_list.py
+++ b/tempest/tests/volume/test_volumes_list.py
@@ -76,7 +76,7 @@
cls.client.wait_for_resource_deletion(volid)
super(VolumesListTest, cls).tearDownClass()
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_list(self):
# Get a list of Volumes
# Fetch all volumes
diff --git a/tempest/tests/volume/test_volumes_snapshots.py b/tempest/tests/volume/test_volumes_snapshots.py
index edc02ac..935d42e 100644
--- a/tempest/tests/volume/test_volumes_snapshots.py
+++ b/tempest/tests/volume/test_volumes_snapshots.py
@@ -37,7 +37,7 @@
def tearDownClass(cls):
super(VolumesSnapshotTest, cls).tearDownClass()
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_snapshot_create_get_delete(self):
# Create a snapshot, get some of the details and then deletes it
resp, snapshot = self.snapshots_client.create_snapshot(
@@ -52,7 +52,7 @@
self.snapshots_client.delete_snapshot(snapshot['id'])
self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
- @attr(type=['smoke', 'gate'])
+ @attr(type=['smoke'])
def test_volume_from_snapshot(self):
# Create a temporary snap using wrapper method from base, then
# create a snap based volume, check resp code and deletes it