Merge "Replace deprecated test.attr with decorators.attr"
This commit is contained in:
commit
3f0887f809
|
@ -13,7 +13,6 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest.lib.common.utils import data_utils as lib_data_utils
|
from tempest.lib.common.utils import data_utils as lib_data_utils
|
||||||
|
@ -56,7 +55,7 @@ class RecordsetsTest(BaseRecordsetsTest):
|
||||||
cls.client = cls.os.recordset_client
|
cls.client = cls.os.recordset_client
|
||||||
cls.zone_client = cls.os.zones_client
|
cls.zone_client = cls.os.zones_client
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('631d74fd-6909-4684-a61b-5c4d2f92c3e7')
|
@decorators.idempotent_id('631d74fd-6909-4684-a61b-5c4d2f92c3e7')
|
||||||
def test_create_recordset(self):
|
def test_create_recordset(self):
|
||||||
recordset_data = data_utils.rand_recordset_data(
|
recordset_data = data_utils.rand_recordset_data(
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
@ -57,7 +56,7 @@ class ZonesTest(BaseZonesTest):
|
||||||
LOG.info('Ensure the fetched response matches the created zone')
|
LOG.info('Ensure the fetched response matches the created zone')
|
||||||
self.assertExpected(zone, body, self.excluded_keys)
|
self.assertExpected(zone, body, self.excluded_keys)
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('a4791906-6cd6-4d27-9f15-32273db8bb3d')
|
@decorators.idempotent_id('a4791906-6cd6-4d27-9f15-32273db8bb3d')
|
||||||
def test_delete_zone(self):
|
def test_delete_zone(self):
|
||||||
LOG.info('Create a zone')
|
LOG.info('Create a zone')
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
|
|
||||||
|
@ -47,7 +46,7 @@ class ZonesExportTest(BaseZoneExportsTest):
|
||||||
LOG.info('Ensure we respond with PENDING')
|
LOG.info('Ensure we respond with PENDING')
|
||||||
self.assertEqual('PENDING', zone_export['status'])
|
self.assertEqual('PENDING', zone_export['status'])
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('2d29a2a9-1941-4b7e-9d8a-ad6c2140ea68')
|
@decorators.idempotent_id('2d29a2a9-1941-4b7e-9d8a-ad6c2140ea68')
|
||||||
def test_show_zone_export(self):
|
def test_show_zone_export(self):
|
||||||
LOG.info('Create a zone')
|
LOG.info('Create a zone')
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
|
|
||||||
|
@ -42,7 +41,7 @@ class ZonesImportTest(BaseZonesImportTest):
|
||||||
LOG.info('Ensure we respond with PENDING')
|
LOG.info('Ensure we respond with PENDING')
|
||||||
self.assertEqual('PENDING', zone_import['status'])
|
self.assertEqual('PENDING', zone_import['status'])
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('c8909558-0dc6-478a-9e91-eb97b52e59e0')
|
@decorators.idempotent_id('c8909558-0dc6-478a-9e91-eb97b52e59e0')
|
||||||
def test_show_zone_import(self):
|
def test_show_zone_import(self):
|
||||||
LOG.info('Create a zone import')
|
LOG.info('Create a zone import')
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
|
@ -33,8 +32,8 @@ class ZonesTest(base.BaseDnsV2Test):
|
||||||
cls.client = cls.os.zones_client
|
cls.client = cls.os.zones_client
|
||||||
cls.query_client = cls.os.query_client
|
cls.query_client = cls.os.query_client
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.idempotent_id('d0648f53-4114-45bd-8792-462a82f69d32')
|
@decorators.idempotent_id('d0648f53-4114-45bd-8792-462a82f69d32')
|
||||||
def test_create_and_delete_zone(self):
|
def test_create_and_delete_zone(self):
|
||||||
LOG.info('Create a zone')
|
LOG.info('Create a zone')
|
||||||
|
@ -65,7 +64,7 @@ class ZonesTest(base.BaseDnsV2Test):
|
||||||
|
|
||||||
waiters.wait_for_zone_404(self.client, zone['id'])
|
waiters.wait_for_zone_404(self.client, zone['id'])
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.idempotent_id('c9838adf-14dc-4097-9130-e5cea3727abb')
|
@decorators.idempotent_id('c9838adf-14dc-4097-9130-e5cea3727abb')
|
||||||
def test_delete_zone_pending_create(self):
|
def test_delete_zone_pending_create(self):
|
||||||
LOG.info('Create a zone')
|
LOG.info('Create a zone')
|
||||||
|
@ -87,7 +86,7 @@ class ZonesTest(base.BaseDnsV2Test):
|
||||||
|
|
||||||
waiters.wait_for_zone_404(self.client, zone['id'])
|
waiters.wait_for_zone_404(self.client, zone['id'])
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.skip_because(bug='1623576')
|
@decorators.skip_because(bug='1623576')
|
||||||
@decorators.idempotent_id('ad8d1f5b-da66-46a0-bbee-14dc84a5d791')
|
@decorators.idempotent_id('ad8d1f5b-da66-46a0-bbee-14dc84a5d791')
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
|
@ -101,7 +100,7 @@ class ZonesTest(base.BaseDnsV2Test):
|
||||||
waiters.wait_for_zone_status(self.client, zone['id'], "ACTIVE")
|
waiters.wait_for_zone_status(self.client, zone['id'], "ACTIVE")
|
||||||
waiters.wait_for_query(self.query_client, zone['name'], "SOA")
|
waiters.wait_for_query(self.query_client, zone['name'], "SOA")
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.skip_because(bug='1623576')
|
@decorators.skip_because(bug='1623576')
|
||||||
@decorators.idempotent_id('d13d3095-c78f-4aae-8fe3-a74ccc335c84')
|
@decorators.idempotent_id('d13d3095-c78f-4aae-8fe3-a74ccc335c84')
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from designate_tempest_plugin.common import waiters
|
from designate_tempest_plugin.common import waiters
|
||||||
|
@ -32,7 +31,7 @@ class ZonesExportTest(BaseZoneExportsTest):
|
||||||
cls.zones_client = cls.os.zones_client
|
cls.zones_client = cls.os.zones_client
|
||||||
cls.client = cls.os.zone_exports_client
|
cls.client = cls.os.zone_exports_client
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.idempotent_id('0484c3c4-df57-458e-a6e5-6eb63e0475e0')
|
@decorators.idempotent_id('0484c3c4-df57-458e-a6e5-6eb63e0475e0')
|
||||||
def test_create_zone_export_and_show_exported_zonefile(self):
|
def test_create_zone_export_and_show_exported_zonefile(self):
|
||||||
LOG.info('Create a zone to be exported')
|
LOG.info('Create a zone to be exported')
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from tempest import test
|
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from designate_tempest_plugin.common import waiters
|
from designate_tempest_plugin.common import waiters
|
||||||
|
@ -31,7 +30,7 @@ class ZonesImportTest(BaseZonesImportTest):
|
||||||
cls.client = cls.os.zone_imports_client
|
cls.client = cls.os.zone_imports_client
|
||||||
cls.zones_client = cls.os.zones_client
|
cls.zones_client = cls.os.zones_client
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
@decorators.idempotent_id('679f38d0-2f2f-49c5-934e-8fe0c452f56e')
|
@decorators.idempotent_id('679f38d0-2f2f-49c5-934e-8fe0c452f56e')
|
||||||
def test_create_zone_import_and_wait_for_zone(self):
|
def test_create_zone_import_and_wait_for_zone(self):
|
||||||
name = dns_data_utils.rand_zone_name('testimport')
|
name = dns_data_utils.rand_zone_name('testimport')
|
||||||
|
|
|
@ -168,7 +168,7 @@ included below:
|
||||||
|
|
||||||
cls.client = cls.os.zones_client
|
cls.client = cls.os.zones_client
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('fbabd6af-238a-462e-b923-de4d736b90a7')
|
@decorators.idempotent_id('fbabd6af-238a-462e-b923-de4d736b90a7')
|
||||||
def test_create_zone(self):
|
def test_create_zone(self):
|
||||||
LOG.info('Create a zone')
|
LOG.info('Create a zone')
|
||||||
|
@ -244,7 +244,7 @@ Example:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@test.attr
|
@decorators.attr
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
The `attr` decorator is used to set test attributes, this is most commonly used
|
The `attr` decorator is used to set test attributes, this is most commonly used
|
||||||
|
@ -259,11 +259,11 @@ Example:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
class ZonesTest(BaseZonesTest):
|
class ZonesTest(BaseZonesTest):
|
||||||
@test.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
def test_create_zone(self):
|
def test_create_zone(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@test.attr(type='slow')
|
@decorators.attr(type='slow')
|
||||||
def test_something_else(self):
|
def test_something_else(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue