Merge "Fix test_basic_metadata_definition_namespaces"
This commit is contained in:
commit
0afd087cba
@ -64,6 +64,7 @@ class MetadataNamespacesTest(base.BaseV2ImageAdminTest):
|
||||
self.assertEqual(False, body['protected'])
|
||||
# now able to delete the non-protected namespace
|
||||
self.namespaces_client.delete_namespace(namespace_name)
|
||||
self.namespaces_client.wait_for_resource_deletion(namespace_name)
|
||||
|
||||
def _cleanup_namespace(self, namespace_name):
|
||||
body = self.namespaces_client.show_namespace(namespace_name)
|
||||
|
@ -16,6 +16,7 @@
|
||||
from oslo_serialization import jsonutils as json
|
||||
|
||||
from tempest.lib.common import rest_client
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
|
||||
|
||||
class NamespacesClient(rest_client.RestClient):
|
||||
@ -60,6 +61,13 @@ class NamespacesClient(rest_client.RestClient):
|
||||
body = json.loads(body)
|
||||
return rest_client.ResponseBody(resp, body)
|
||||
|
||||
def is_resource_deleted(self, id):
|
||||
try:
|
||||
self.show_namespace(id)
|
||||
except lib_exc.NotFound:
|
||||
return True
|
||||
return False
|
||||
|
||||
def update_namespace(self, namespace, **kwargs):
|
||||
"""Update a namespace.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user