mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-24 19:30:38 +00:00
Merge pull request #589 from tobias-urdin/v2-presigned-get
Add v2 signature presigned get_object tests
This commit is contained in:
commit
cba8047c7e
2 changed files with 36 additions and 0 deletions
|
@ -511,6 +511,17 @@ def get_tenant_client(client_config=None):
|
||||||
config=client_config)
|
config=client_config)
|
||||||
return client
|
return client
|
||||||
|
|
||||||
|
def get_v2_tenant_client():
|
||||||
|
client_config = Config(signature_version='s3')
|
||||||
|
client = boto3.client(service_name='s3',
|
||||||
|
aws_access_key_id=config.tenant_access_key,
|
||||||
|
aws_secret_access_key=config.tenant_secret_key,
|
||||||
|
endpoint_url=config.default_endpoint,
|
||||||
|
use_ssl=config.default_is_secure,
|
||||||
|
verify=config.default_ssl_verify,
|
||||||
|
config=client_config)
|
||||||
|
return client
|
||||||
|
|
||||||
def get_tenant_iam_client():
|
def get_tenant_iam_client():
|
||||||
|
|
||||||
client = boto3.client(service_name='iam',
|
client = boto3.client(service_name='iam',
|
||||||
|
|
|
@ -67,6 +67,7 @@ from . import (
|
||||||
get_alt_email,
|
get_alt_email,
|
||||||
get_alt_client,
|
get_alt_client,
|
||||||
get_tenant_client,
|
get_tenant_client,
|
||||||
|
get_v2_tenant_client,
|
||||||
get_tenant_iam_client,
|
get_tenant_iam_client,
|
||||||
get_tenant_name,
|
get_tenant_name,
|
||||||
get_tenant_user_id,
|
get_tenant_user_id,
|
||||||
|
@ -6788,6 +6789,18 @@ def test_cors_presigned_get_object_tenant():
|
||||||
method='get_object',
|
method='get_object',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_cors_presigned_get_object_v2():
|
||||||
|
_test_cors_options_presigned_method(
|
||||||
|
client=get_v2_client(),
|
||||||
|
method='get_object',
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_cors_presigned_get_object_tenant_v2():
|
||||||
|
_test_cors_options_presigned_method(
|
||||||
|
client=get_v2_tenant_client(),
|
||||||
|
method='get_object',
|
||||||
|
)
|
||||||
|
|
||||||
def test_cors_presigned_put_object():
|
def test_cors_presigned_put_object():
|
||||||
_test_cors_options_presigned_method(
|
_test_cors_options_presigned_method(
|
||||||
client=get_client(),
|
client=get_client(),
|
||||||
|
@ -6801,6 +6814,18 @@ def test_cors_presigned_put_object_with_acl():
|
||||||
cannedACL='private',
|
cannedACL='private',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_cors_presigned_put_object_v2():
|
||||||
|
_test_cors_options_presigned_method(
|
||||||
|
client=get_v2_client(),
|
||||||
|
method='put_object',
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_cors_presigned_put_object_tenant_v2():
|
||||||
|
_test_cors_options_presigned_method(
|
||||||
|
client=get_v2_tenant_client(),
|
||||||
|
method='put_object',
|
||||||
|
)
|
||||||
|
|
||||||
def test_cors_presigned_put_object_tenant():
|
def test_cors_presigned_put_object_tenant():
|
||||||
_test_cors_options_presigned_method(
|
_test_cors_options_presigned_method(
|
||||||
client=get_tenant_client(),
|
client=get_tenant_client(),
|
||||||
|
|
Loading…
Reference in a new issue