]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
check if setting acls modifies etag in bucket listing
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 29 Sep 2015 15:14:48 +0000 (08:14 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 29 Sep 2015 15:15:42 +0000 (08:15 -0700)
This checks for ceph issue #12955

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
s3tests/functional/test_s3.py

index cbc5af0297cb3f82f846b1d5a10395f473f65f55..374ca5cfb11c4de17396c87841b79965184fcdef 100644 (file)
@@ -3419,6 +3419,30 @@ def test_object_acl_full_control_verify_owner():
     policy = k2.get_acl()
     eq(policy.owner.id, config.main.user_id)
 
+@attr(resource='object.acls')
+@attr(method='put')
+@attr(operation='set write-acp')
+@attr(assertion='does not modify other attributes')
+def test_object_acl_full_control_verify_attributes():
+    bucket = get_new_bucket(targets.main.default)
+    bucket.set_acl('public-read-write')
+
+    key = bucket.new_key('foo')
+    key.set_contents_from_string('bar', {'x-amz-foo': 'bar'})
+
+    etag = key.etag
+    content_type = key.content_type
+
+    for k in bucket.list():
+        eq(k.etag, etag)
+        eq(k.content_type, content_type)
+
+    key.add_user_grant(permission='FULL_CONTROL', user_id=config.alt.user_id)
+
+    for k in bucket.list():
+        eq(k.etag, etag)
+        eq(k.content_type, content_type)
+
 
 @attr(resource='bucket')
 @attr(method='ACLs')