Browse Source

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
changes/17/705917/1
lkuchlan 2 weeks ago
parent
commit
820064b6d7
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py

+ 6
- 0
manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py View File

@@ -47,6 +47,7 @@ class ShareManageUnmanageBase(manager.ShareScenarioTest):
* Unmount share
* Delete share
* Attempt to manage share (fail expected)
* Delete failed managed share
* Terminate the instance
"""

@@ -159,6 +160,11 @@ class ShareManageUnmanageBase(manager.ShareScenarioTest):

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):
protocol = "nfs"


Loading…
Cancel
Save