Switch to using the skip_because decorator from tempest-lib
Included in tempest-lib 0.2.0 was the migrated skip_because decorator.
This commit switches all the usage of the skip decorator from tempest's
internal copy to use the version in the library where it will be
maintained moving forward.
Change-Id: Ic2d7b9c9247f78aa43cd780e893ce1834a20045e
diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py
index 4aedaa4..89447e0 100644
--- a/tempest/api/baremetal/admin/test_ports.py
+++ b/tempest/api/baremetal/admin/test_ports.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.baremetal.admin import base
from tempest.common.utils import data_utils
from tempest import exceptions as exc
@@ -57,7 +59,7 @@
_, body = self.client.show_port(uuid)
self._assertExpected(port, body)
- @test.skip_because(bug='1398350')
+ @decorators.skip_because(bug='1398350')
@test.attr(type='smoke')
def test_create_port_with_extra(self):
node_id = self.node['uuid']
@@ -231,7 +233,7 @@
_, body = self.client.show_port(port['uuid'])
self.assertEqual(extra, body['extra'])
- @test.skip_because(bug='1398350')
+ @decorators.skip_because(bug='1398350')
@test.attr(type='smoke')
def test_update_port_mixed_ops(self):
node_id = self.node['uuid']
diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py
index 532f195..0783545 100644
--- a/tempest/api/compute/admin/test_quotas_negative.py
+++ b/tempest/api/compute/admin/test_quotas_negative.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.compute import base
from tempest.common.utils import data_utils
from tempest import config
@@ -91,8 +93,8 @@
self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
self.create_test_server)
- @test.skip_because(bug="1186354",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1186354",
+ condition=CONF.service_available.neutron)
@test.attr(type='gate')
@test.services('network')
def test_security_groups_exceed_limit(self):
@@ -118,8 +120,8 @@
self.sg_client.create_security_group,
"sg-overlimit", "sg-desc")
- @test.skip_because(bug="1186354",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1186354",
+ condition=CONF.service_available.neutron)
@test.attr(type=['negative', 'gate'])
@test.services('network')
def test_security_groups_rules_exceed_limit(self):
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 5210077..cff9a43 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.compute import base
from tempest.common.utils import data_utils
from tempest import test
@@ -142,7 +144,7 @@
self.assertEqual(server['status'], 'ACTIVE')
@test.attr(type='gate')
- @test.skip_because(bug="1240043")
+ @decorators.skip_because(bug="1240043")
def test_get_server_diagnostics_by_admin(self):
# Retrieve server diagnostics by admin user
resp, diagnostic = self.client.get_server_diagnostics(self.s1_id)
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index ce06180..3a826b9 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
import testtools
from tempest.api.compute.security_groups import base
@@ -55,8 +56,8 @@
self.assertRaises(exceptions.NotFound, self.client.get_security_group,
non_exist_id)
- @test.skip_because(bug="1161411",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1161411",
+ condition=CONF.service_available.neutron)
@test.attr(type=['negative', 'smoke'])
@test.services('network')
def test_security_group_create_with_invalid_group_name(self):
@@ -76,8 +77,8 @@
self.client.create_security_group, s_name,
s_description)
- @test.skip_because(bug="1161411",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1161411",
+ condition=CONF.service_available.neutron)
@test.attr(type=['negative', 'smoke'])
@test.services('network')
def test_security_group_create_with_invalid_group_description(self):
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 7964cf7..375f441 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.compute import base
from tempest.api import utils
from tempest.common.utils import data_utils
@@ -269,8 +271,8 @@
self.assertNotIn(self.s2_name, map(lambda x: x['name'], servers))
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
- @test.skip_because(bug="1182883",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1182883",
+ condition=CONF.service_available.neutron)
@test.attr(type='gate')
def test_list_servers_filtered_by_ip_regex(self):
# Filter servers by regex ip
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 17e3669..9edaede 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -17,6 +17,7 @@
import logging
import urlparse
+from tempest_lib import decorators
import testtools
from tempest.api.compute import base
@@ -100,7 +101,7 @@
# The server should be power cycled
self._test_reboot_server('HARD')
- @test.skip_because(bug="1014647")
+ @decorators.skip_because(bug="1014647")
@test.attr(type='smoke')
def test_reboot_server_soft(self):
# The server should be signaled to reboot gracefully
diff --git a/tempest/api/compute/servers/test_server_group.py b/tempest/api/compute/servers/test_server_group.py
index 0af19c0..fe5dca0 100644
--- a/tempest/api/compute/servers/test_server_group.py
+++ b/tempest/api/compute/servers/test_server_group.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.compute import base
from tempest.common.utils import data_utils
from tempest import test
@@ -74,7 +76,7 @@
policy = ['anti-affinity']
self._create_delete_server_group(policy)
- @test.skip_because(bug="1324348")
+ @decorators.skip_because(bug="1324348")
@test.attr(type='gate')
def test_create_delete_server_group_with_multiple_policies(self):
# Create and Delete the server-group with multiple policies
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 48af084..e07a7ed 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -14,6 +14,7 @@
# under the License.
import netaddr
+from tempest_lib import decorators
from tempest.api.compute import base
from tempest import config
@@ -33,8 +34,8 @@
resp, server = cls.create_test_server(wait_until='ACTIVE')
cls.server_id = server['id']
- @test.skip_because(bug="1183436",
- condition=CONF.service_available.neutron)
+ @decorators.skip_because(bug="1183436",
+ condition=CONF.service_available.neutron)
@test.attr(type='gate')
@test.services('network')
def test_list_virtual_interfaces(self):
diff --git a/tempest/api/messaging/test_claims.py b/tempest/api/messaging/test_claims.py
index 1b004dd..1aab8d2 100644
--- a/tempest/api/messaging/test_claims.py
+++ b/tempest/api/messaging/test_claims.py
@@ -16,6 +16,8 @@
import logging
import urlparse
+from tempest_lib import decorators
+
from tempest.api.messaging import base
from tempest.common.utils import data_utils
from tempest import config
@@ -65,7 +67,7 @@
# Delete Claimed message
self.client.delete_messages(claimed_message_uri)
- @test.skip_because(bug="1331517")
+ @decorators.skip_because(bug="1331517")
@test.attr(type='smoke')
def test_query_claim(self):
# Post a Claim
@@ -79,7 +81,7 @@
claimed_message_uri = body[0]['href']
self.delete_messages(claimed_message_uri)
- @test.skip_because(bug="1328111")
+ @decorators.skip_because(bug="1328111")
@test.attr(type='smoke')
def test_update_claim(self):
# Post a Claim
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index b606115..df76757 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.network import base
from tempest.common.utils import data_utils
from tempest import test
@@ -422,6 +424,6 @@
self.assertEqual(2, member['weight'])
-@test.skip_because(bug="1402007")
+@decorators.skip_because(bug="1402007")
class LoadBalancerIpV6TestJSON(LoadBalancerTestJSON):
_ip_version = 6
diff --git a/tempest/api/network/test_service_type_management.py b/tempest/api/network/test_service_type_management.py
index 447c3f3..0492fe3 100644
--- a/tempest/api/network/test_service_type_management.py
+++ b/tempest/api/network/test_service_type_management.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.network import base
from tempest import test
@@ -24,7 +26,7 @@
msg = "Neutron Service Type Management not enabled."
raise cls.skipException(msg)
- @test.skip_because(bug="1400370")
+ @decorators.skip_because(bug="1400370")
@test.attr(type='smoke')
def test_service_provider_list(self):
body = self.client.list_service_providers()
diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index a6ea6ee..5a0be54 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
+
from tempest.api.object_storage import base
from tempest import clients
from tempest.common.utils import data_utils
@@ -93,7 +95,7 @@
{"Quota-Bytes": "100"})
@test.attr(type=["negative", "smoke"])
- @test.skip_because(bug="1310597")
+ @decorators.skip_because(bug="1310597")
@test.requires_ext(extension='account_quotas', service='object')
def test_upload_large_object(self):
object_name = data_utils.rand_name(name="TestObject")
diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index 7f8cb8b..09b0ce0 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
import testtools
import time
import urlparse
@@ -112,7 +113,7 @@
self.assertEqual(object_content, obj_name[::-1])
@test.attr(type='slow')
- @test.skip_because(bug='1317133')
+ @decorators.skip_because(bug='1317133')
@testtools.skipIf(
not CONF.object_storage_feature_enabled.container_sync,
'Old-style container sync function is disabled')
diff --git a/tempest/api/telemetry/test_telemetry_notification_api.py b/tempest/api/telemetry/test_telemetry_notification_api.py
index e64cd4a..7e5d6ee 100644
--- a/tempest/api/telemetry/test_telemetry_notification_api.py
+++ b/tempest/api/telemetry/test_telemetry_notification_api.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest_lib import decorators
import testtools
from tempest.api.telemetry import base
@@ -46,7 +47,7 @@
@test.services("image")
@testtools.skipIf(not CONF.image_feature_enabled.api_v1,
"Glance api v1 is disabled")
- @test.skip_because(bug='1351627')
+ @decorators.skip_because(bug='1351627')
def test_check_glance_v1_notifications(self):
body = self.create_image(self.image_client)
self.image_client.update_image(body['id'], data='data')
@@ -62,7 +63,7 @@
@test.services("image")
@testtools.skipIf(not CONF.image_feature_enabled.api_v2,
"Glance api v2 is disabled")
- @test.skip_because(bug='1351627')
+ @decorators.skip_because(bug='1351627')
def test_check_glance_v2_notifications(self):
body = self.create_image(self.image_client_v2)