forked from TrueCloudLab/s3-tests
crypto: add key headers to valid HEAD requests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit e49cf3ddab
)
This commit is contained in:
parent
5c6658d5ba
commit
90ab37f1c5
1 changed files with 3 additions and 3 deletions
|
@ -7359,7 +7359,7 @@ def test_encryption_sse_c_multipart_upload():
|
||||||
eq(result.get('x-rgw-object-count', 1), 1)
|
eq(result.get('x-rgw-object-count', 1), 1)
|
||||||
eq(result.get('x-rgw-bytes-used', 30 * 1024 * 1024), 30 * 1024 * 1024)
|
eq(result.get('x-rgw-bytes-used', 30 * 1024 * 1024), 30 * 1024 * 1024)
|
||||||
|
|
||||||
k = bucket.get_key(key)
|
k = bucket.get_key(key, headers=enc_headers)
|
||||||
eq(k.metadata['foo'], 'bar')
|
eq(k.metadata['foo'], 'bar')
|
||||||
eq(k.content_type, content_type)
|
eq(k.content_type, content_type)
|
||||||
test_string = k.get_contents_as_string(headers=enc_headers)
|
test_string = k.get_contents_as_string(headers=enc_headers)
|
||||||
|
@ -7458,7 +7458,7 @@ def test_encryption_sse_c_multipart_bad_download():
|
||||||
eq(result.get('x-rgw-object-count', 1), 1)
|
eq(result.get('x-rgw-object-count', 1), 1)
|
||||||
eq(result.get('x-rgw-bytes-used', 30 * 1024 * 1024), 30 * 1024 * 1024)
|
eq(result.get('x-rgw-bytes-used', 30 * 1024 * 1024), 30 * 1024 * 1024)
|
||||||
|
|
||||||
k = bucket.get_key(key)
|
k = bucket.get_key(key, headers=put_headers)
|
||||||
eq(k.metadata['foo'], 'bar')
|
eq(k.metadata['foo'], 'bar')
|
||||||
eq(k.content_type, content_type)
|
eq(k.content_type, content_type)
|
||||||
e = assert_raises(boto.exception.S3ResponseError,
|
e = assert_raises(boto.exception.S3ResponseError,
|
||||||
|
@ -7512,7 +7512,7 @@ def test_encryption_sse_c_post_object_authenticated_request():
|
||||||
'x-amz-server-side-encryption-customer-key-md5': 'DWygnHRtgiJ77HCm+1rvHw=='
|
'x-amz-server-side-encryption-customer-key-md5': 'DWygnHRtgiJ77HCm+1rvHw=='
|
||||||
}
|
}
|
||||||
|
|
||||||
key = bucket.get_key("foo.txt")
|
key = bucket.get_key("foo.txt", headers=get_headers)
|
||||||
got = key.get_contents_as_string(headers=get_headers)
|
got = key.get_contents_as_string(headers=get_headers)
|
||||||
eq(got, 'bar')
|
eq(got, 'bar')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue