mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-28 19:31:39 +00:00
Merge pull request #50 from andrewgaul/test-object-acl-canned-during-create
Add test_object_acl_canned_during_create Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
1e9ba11d9e
1 changed files with 33 additions and 0 deletions
|
@ -3124,6 +3124,39 @@ def test_object_acl_default():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@attr(resource='object.acls')
|
||||||
|
@attr(method='put')
|
||||||
|
@attr(operation='acl public-read')
|
||||||
|
@attr(assertion='read back expected values')
|
||||||
|
def test_object_acl_canned_during_create():
|
||||||
|
bucket = get_new_bucket()
|
||||||
|
key = bucket.new_key('foo')
|
||||||
|
key.set_contents_from_string('bar', policy='public-read')
|
||||||
|
policy = key.get_acl()
|
||||||
|
print repr(policy)
|
||||||
|
check_grants(
|
||||||
|
policy.acl.grants,
|
||||||
|
[
|
||||||
|
dict(
|
||||||
|
permission='FULL_CONTROL',
|
||||||
|
id=policy.owner.id,
|
||||||
|
display_name=policy.owner.display_name,
|
||||||
|
uri=None,
|
||||||
|
email_address=None,
|
||||||
|
type='CanonicalUser',
|
||||||
|
),
|
||||||
|
dict(
|
||||||
|
permission='READ',
|
||||||
|
id=None,
|
||||||
|
display_name=None,
|
||||||
|
uri='http://acs.amazonaws.com/groups/global/AllUsers',
|
||||||
|
email_address=None,
|
||||||
|
type='Group',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@attr(resource='object.acls')
|
@attr(resource='object.acls')
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
@attr(operation='acl public-read,private')
|
@attr(operation='acl public-read,private')
|
||||||
|
|
Loading…
Reference in a new issue