Move test_restore_server_invalid_state test to admin test
Nova is changing the RBAC policy default for deffered deleted API form member-or-admin to manager-or-admin[1] and for that test_restore_server_invalid_state needs to be tested with admin client ohterwise it fail[2]. There is no change in test logic except it is tested with admin client to perform the test objective. [1] https://review.opendev.org/c/openstack/nova/+/941347 [2] https://0ccc316b4109089131e3-45dd8d096407cabbe1019de430c921aa.ssl.cf2.rackcdn.com/941347/1/check/tempest-integrated-compute/4c25539/testr_results.html Change-Id: Ied10361920ef08d879e539a3ada3228b40b37150
This commit is contained in:
@@ -65,6 +65,18 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
||||
self.s1_id,
|
||||
flavor_ref['id'])
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('7fcadfab-bd6a-4753-8db7-4a51e51aade9')
|
||||
def test_restore_server_invalid_state(self):
|
||||
"""Restore-deleting a server not in 'soft-delete' state should fail
|
||||
|
||||
We can restore a soft deleted server, but can't restore a server that
|
||||
is not in 'soft-delete' state.
|
||||
"""
|
||||
self.assertRaises(lib_exc.Conflict,
|
||||
self.client.restore_soft_deleted_server,
|
||||
self.s1_id)
|
||||
|
||||
@decorators.idempotent_id('7368a427-2f26-4ad9-9ba9-911a0ec2b0db')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
|
@@ -472,18 +472,6 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
||||
self.client.restore_soft_deleted_server,
|
||||
nonexistent_server)
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('7fcadfab-bd6a-4753-8db7-4a51e51aade9')
|
||||
def test_restore_server_invalid_state(self):
|
||||
"""Restore-deleting a server not in 'soft-delete' state should fail
|
||||
|
||||
We can restore a soft deleted server, but can't restore a server that
|
||||
is not in 'soft-delete' state.
|
||||
"""
|
||||
self.assertRaises(lib_exc.Conflict,
|
||||
self.client.restore_soft_deleted_server,
|
||||
self.server_id)
|
||||
|
||||
@decorators.idempotent_id('abca56e2-a892-48ea-b5e5-e07e69774816')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
|
Reference in New Issue
Block a user