Adds exception.Conflict handler to is_resource_delete function
Swift API get_objects returns 409 when object delete in progress. HTTP 409 is converted to exception.Conflict and raised Updated is_resource_deleted check to handle exception.Conflict and return False (Object is not deleted) If the exception is not handled the test cases fails with the error b'BucketAlreadyExists which is not correct status for a bucket which is being deleted by the tempest tearDown call. Closes-Bug: #1938583 Change-Id: I6957c3ee1f3d60e7b8cd34d3db89bb27347d08b7
This commit is contained in:
parent
b19859f919
commit
717cc793db
@ -28,6 +28,8 @@ class ObjectClient(rest_client.RestClient):
|
||||
self.get_object(container, object_name)
|
||||
except exceptions.NotFound:
|
||||
return True
|
||||
except exceptions.Conflict:
|
||||
return False
|
||||
return False
|
||||
|
||||
def create_object(self, container, object_name, data,
|
||||
|
Loading…
Reference in New Issue
Block a user