Delete Share Instance of unmanaged share
Currently, for an unmanaged share, the associated share instance
stays with a status as 'unmanaged', which is not correct.
Associated share instance should be deleted.
Hence made the correction
Change-Id: Ib88205db91d69bd8fc4d98e82b479eadac85b604
Closes-Bug: #1510208
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage.py b/manila_tempest_tests/tests/api/admin/test_share_manage.py
index c7efa01..bbd98bc 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py
@@ -147,6 +147,13 @@
@test.attr(type=["gate", "smoke"])
def test_manage(self):
+ # After 'unmanage' operation, share instance should be deleted.
+ # Assert not related to 'manage' test, but placed here for
+ # resource optimization.
+ share_instance_list = self.shares_v2_client.list_share_instances()
+ share_ids = [si['share_id'] for si in share_instance_list]
+ self.assertNotIn(self.shares[0]['id'], share_ids)
+
self._test_manage(share=self.shares[0])
@test.attr(type=["gate", "smoke"])