]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
Test delete object on non-existent bucket 17/head
authorAndrew Gaul <andrew@gaul.org>
Fri, 22 Aug 2014 18:05:09 +0000 (11:05 -0700)
committerAndrew Gaul <andrew@gaul.org>
Fri, 22 Aug 2014 18:06:04 +0000 (11:06 -0700)
s3tests/functional/test_s3.py

index 44db1f191f38cfe5288067fe81546240b8cda8ae..a28dbb25b8e298d5974f610ab1ba1241793a2d39 100644 (file)
@@ -2152,6 +2152,20 @@ def test_object_raw_get_bucket_gone():
     eq(res.reason, 'Not Found')
 
 
+@attr(resource='object')
+@attr(method='delete')
+@attr(operation='deleted object and bucket')
+@attr(assertion='fails 404')
+def test_object_delete_key_bucket_gone():
+    (bucket, key) = _setup_request()
+    key.delete()
+    bucket.delete()
+
+    e = assert_raises(boto.exception.S3ResponseError, key.delete)
+    eq(e.status, 404)
+    eq(e.reason, 'Not Found')
+    eq(e.error_code, 'NoSuchBucket')
+
 @attr(resource='object')
 @attr(method='get')
 @attr(operation='deleted object')