mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
qa/rgw: fix 'policy show' tests in radosgw_admin_rest task
'policy show' returns a json-encoded representation of RGWAccessControlPolicy, while key.get_xml_acl() returns RGWAccessControlPolicy_S3 encoded as xml. so even with '&format=xml', the strings won't match Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
638fa1de42
commit
b696c8493c
@ -591,18 +591,14 @@ def task(ctx, config):
|
||||
|
||||
(ret, out) = rgwadmin_rest(admin_conn, ['policy', 'show'], {'bucket' : bucket.name, 'object' : key.key})
|
||||
assert ret == 200
|
||||
|
||||
acl = key.get_xml_acl()
|
||||
assert acl == out.strip('\n')
|
||||
assert len(out['acl']['grant_map']) == 1
|
||||
|
||||
# add another grantee by making the object public read
|
||||
key.set_acl('public-read')
|
||||
|
||||
(ret, out) = rgwadmin_rest(admin_conn, ['policy', 'show'], {'bucket' : bucket.name, 'object' : key.key})
|
||||
assert ret == 200
|
||||
|
||||
acl = key.get_xml_acl()
|
||||
assert acl == out.strip('\n')
|
||||
assert len(out['acl']['grant_map']) == 2
|
||||
|
||||
# TESTCASE 'rm-bucket', 'bucket', 'rm', 'bucket with objects', 'succeeds'
|
||||
bucket = connection.create_bucket(bucket_name)
|
||||
|
Loading…
Reference in New Issue
Block a user