Fix resources cleanup
When running "test_create_manage_and_write" test with default share type (i.e. set default_share_type_name = default in tempest.conf) it passed, however, when there is no default share type it failed with "Target share type is still in use." This is because the failed managed share is not deleted before the share type it is based on. This patch makes sure the manila share is deleted before its share type. Change-Id: I1ba4ae3dcc274bf5e6dee5320e52117f440ebb5d Related-bug: #1862001
This commit is contained in:
parent
ca1340cc44
commit
820064b6d7
|
@ -47,6 +47,7 @@ class ShareManageUnmanageBase(manager.ShareScenarioTest):
|
||||||
* Unmount share
|
* Unmount share
|
||||||
* Delete share
|
* Delete share
|
||||||
* Attempt to manage share (fail expected)
|
* Attempt to manage share (fail expected)
|
||||||
|
* Delete failed managed share
|
||||||
* Terminate the instance
|
* Terminate the instance
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -159,6 +160,11 @@ class ShareManageUnmanageBase(manager.ShareScenarioTest):
|
||||||
|
|
||||||
self.shares_admin_v2_client.reset_state(remanaged_share['id'])
|
self.shares_admin_v2_client.reset_state(remanaged_share['id'])
|
||||||
|
|
||||||
|
LOG.debug('Step 16 - delete failed managed share')
|
||||||
|
self.shares_admin_v2_client.delete_share(remanaged_share['id'])
|
||||||
|
self.shares_admin_v2_client.wait_for_resource_deletion(
|
||||||
|
share_id=remanaged_share['id'])
|
||||||
|
|
||||||
|
|
||||||
class ShareManageUnmanageNFS(ShareManageUnmanageBase):
|
class ShareManageUnmanageNFS(ShareManageUnmanageBase):
|
||||||
protocol = "nfs"
|
protocol = "nfs"
|
||||||
|
|
Loading…
Reference in New Issue