Update tempest to 30.0.0

This PS updates Tempest to 30.0.0. Due to

55414580c2

some refactoring was required around wait_for_interface_detach.

Additionally, the variables:

min_microversion
max_microversion

needed to be renamed to:

volume_min_microversion
volume_max_microversion

for volume related tests. See:

https://review.opendev.org/c/openstack/tempest/+/813676

Change-Id: Ie2183fdd2812d5d2fdfdc0815bf96e5c47a9f1e8
This commit is contained in:
Ritchie, Frank (fr801x) 2022-03-29 13:23:12 -05:00 committed by Frank Ritchie
parent 7ce2d1472e
commit f7d47d9c44
9 changed files with 57 additions and 40 deletions

View File

@ -66,7 +66,7 @@ six==1.11.0
snowballstemmer==1.2.1
stestr==2.0.0
stevedore==1.20.0
tempest==17.1.0
tempest==30.0.0
testrepository==0.0.20
testtools==2.3.0
traceback2==1.4.0

View File

@ -616,6 +616,11 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
raise cls.skipException(
'%s skipped as Neutron is required' % cls.__name__)
@classmethod
def setup_clients(cls):
super(MiscPolicyActionsNetworkRbacTest, cls).setup_clients()
cls.servers_admin_client = cls.os_admin.servers_client
@classmethod
def setup_credentials(cls):
cls.prepare_instance_network()
@ -659,16 +664,29 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
# be deleted
cls.addClassResourceCleanup(_cleanup_ports, cls.network['id'])
def _delete_and_wait_for_interface_detach(
self, server_id, port_id):
req_id = self.interfaces_client.delete_interface(
server_id, port_id
).response['x-openstack-request-id']
waiters.wait_for_interface_detach(
self.servers_admin_client, server_id, port_id, req_id)
def _delete_and_wait_for_interface_detach_ignore_timeout(
self, server_id, port_id):
try:
self._delete_and_wait_for_interface_detach(
server_id, port_id)
except lib_exc.TimeoutException:
pass
def _attach_interface_to_server(self):
network_id = self.network['id']
interface = self.interfaces_client.create_interface(
self.server['id'], net_id=network_id)['interfaceAttachment']
self.addCleanup(
waiters.wait_for_interface_detach, self.interfaces_client,
self.server['id'], interface['port_id'])
self.addCleanup(
test_utils.call_and_ignore_notfound_exc,
self.interfaces_client.delete_interface,
self._delete_and_wait_for_interface_detach_ignore_timeout,
self.server['id'], interface['port_id'])
waiters.wait_for_interface_status(
self.interfaces_client, self.server['id'],
@ -714,12 +732,9 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
with self.override_role():
interface = self.interfaces_client.create_interface(
self.server['id'], net_id=network_id)['interfaceAttachment']
self.addCleanup(
waiters.wait_for_interface_detach, self.interfaces_client,
self.server['id'], interface['port_id'])
self.addCleanup(
test_utils.call_and_ignore_notfound_exc,
self.interfaces_client.delete_interface,
self._delete_and_wait_for_interface_detach_ignore_timeout,
self.server['id'], interface['port_id'])
waiters.wait_for_interface_status(
self.interfaces_client, self.server['id'],
@ -737,10 +752,15 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
interface = self._attach_interface_to_server()
with self.override_role():
self.interfaces_client.delete_interface(self.server['id'],
interface['port_id'])
req_id = self.interfaces_client.delete_interface(
self.server['id'], interface['port_id'])
try:
# interface may be not found - we need to ignore that
waiters.wait_for_interface_detach(
self.interfaces_client, self.server['id'], interface['port_id'])
self.servers_admin_client, self.server['id'],
interface['port_id'], req_id)
except lib_exc.NotFound:
pass
@decorators.idempotent_id('6886d360-0d86-4760-b1a3-882d81fbebcc')
@utils.requires_ext(extension='os-ips', service='compute')
@ -784,10 +804,7 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
self.server['id'])['interfaceAttachment']
network_id = interface['net_id']
self.addCleanup(
waiters.wait_for_interface_detach, self.interfaces_client,
self.server['id'], interface['port_id'])
self.addCleanup(
self.interfaces_client.delete_interface,
self._delete_and_wait_for_interface_detach,
self.server['id'], interface['port_id'])
with self.override_role():

View File

@ -61,8 +61,8 @@ class BaseGroupSnapshotsRbacTest(rbac_base.BaseVolumeRbacTest):
class GroupSnaphotsV314RbacTest(BaseGroupSnapshotsRbacTest):
_api_version = 3
min_microversion = '3.14'
max_microversion = 'latest'
volume_min_microversion = '3.14'
volume_max_microversion = 'latest'
@classmethod
def skip_checks(cls):
@ -158,8 +158,8 @@ class GroupSnaphotsV314RbacTest(BaseGroupSnapshotsRbacTest):
class GroupSnaphotsV319RbacTest(BaseGroupSnapshotsRbacTest):
_api_version = 3
min_microversion = '3.19'
max_microversion = 'latest'
volume_min_microversion = '3.19'
volume_max_microversion = 'latest'
@classmethod
def skip_checks(cls):

View File

@ -38,8 +38,8 @@ else:
class GroupTypeSpecsRbacTest(rbac_base.BaseVolumeRbacTest):
_api_version = 3
min_microversion = '3.11'
max_microversion = 'latest'
volume_min_microversion = '3.11'
volume_max_microversion = 'latest'
@decorators.idempotent_id('b2859734-00ad-4a22-88ee-541698e90d12')
@rbac_rule_validation.action(

View File

@ -69,8 +69,8 @@ class BaseGroupRbacTest(rbac_base.BaseVolumeRbacTest):
class GroupsV3RbacTest(BaseGroupRbacTest):
min_microversion = '3.13'
max_microversion = 'latest'
volume_min_microversion = '3.13'
volume_max_microversion = 'latest'
@decorators.idempotent_id('43235328-66ae-424f-bc7f-f709c0ca268c')
@rbac_rule_validation.action(
@ -152,8 +152,8 @@ class GroupsV3RbacTest(BaseGroupRbacTest):
class GroupV320RbacTest(BaseGroupRbacTest):
_api_version = 3
min_microversion = '3.20'
max_microversion = 'latest'
volume_min_microversion = '3.20'
volume_max_microversion = 'latest'
@decorators.idempotent_id('b849c1d4-3215-4f9d-b1e6-0aeb4b2b65ac')
@rbac_rule_validation.action(
@ -172,8 +172,8 @@ class GroupV320RbacTest(BaseGroupRbacTest):
class GroupTypesV3RbacTest(rbac_base.BaseVolumeRbacTest):
min_microversion = '3.11'
max_microversion = 'latest'
volume_min_microversion = '3.11'
volume_max_microversion = 'latest'
@decorators.idempotent_id('2820f12c-4681-4c7f-b28d-e6925637dff6')
@rbac_rule_validation.action(

View File

@ -25,8 +25,8 @@ CONF = config.CONF
class MessagesV3RbacTest(rbac_base.BaseVolumeRbacTest):
min_microversion = '3.3'
max_microversion = 'latest'
volume_min_microversion = '3.3'
volume_max_microversion = 'latest'
@classmethod
def setup_clients(cls):

View File

@ -220,8 +220,8 @@ class VolumesActionsV3RbacTest(rbac_base.BaseVolumeRbacTest):
class VolumesActionsV310RbacTest(rbac_base.BaseVolumeRbacTest):
_api_version = 3
min_microversion = '3.10'
max_microversion = 'latest'
volume_min_microversion = '3.10'
volume_max_microversion = 'latest'
@classmethod
def setup_clients(cls):
@ -283,8 +283,8 @@ class VolumesActionsV310RbacTest(rbac_base.BaseVolumeRbacTest):
class VolumesActionsV312RbacTest(rbac_base.BaseVolumeRbacTest):
_api_version = 3
min_microversion = '3.12'
max_microversion = 'latest'
volume_min_microversion = '3.12'
volume_max_microversion = 'latest'
@decorators.idempotent_id('a654833d-4811-4acd-93ef-5ac4a34c75bc')
@rbac_rule_validation.action(service="cinder", rules=["volume:get_all"])

View File

@ -183,8 +183,8 @@ class VolumesBackupsV318RbacTest(rbac_base.BaseVolumeRbacTest):
_api_version = 3
# The minimum microversion for showing 'os-backup-project-attr:project_id'
# is 3.18.
min_microversion = '3.18'
max_microversion = 'latest'
volume_min_microversion = '3.18'
volume_max_microversion = 'latest'
@classmethod
def skip_checks(cls):
@ -226,8 +226,8 @@ class VolumesBackupsV318RbacTest(rbac_base.BaseVolumeRbacTest):
class VolumesBackupsV39RbacTest(rbac_base.BaseVolumeRbacTest):
_api_version = 3
min_microversion = '3.9'
max_microversion = 'latest'
volume_min_microversion = '3.9'
volume_max_microversion = 'latest'
@classmethod
def skip_checks(cls):

View File

@ -5,5 +5,5 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.policy>=1.30.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
tempest>=30.0.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0