diff --git a/s3tests_boto3/functional/__init__.py b/s3tests_boto3/functional/__init__.py index 5d7e3c1..9549276 100644 --- a/s3tests_boto3/functional/__init__.py +++ b/s3tests_boto3/functional/__init__.py @@ -293,6 +293,18 @@ def get_bad_auth_client(aws_access_key_id='badauth'): config=Config(signature_version='s3v4')) return client +def get_svc_client(client_config=None, svc='s3'): + if client_config == None: + client_config = Config(signature_version='s3v4') + + client = boto3.client(service_name=svc, + aws_access_key_id=config.main_access_key, + aws_secret_access_key=config.main_secret_key, + endpoint_url=config.default_endpoint, + use_ssl=config.default_is_secure, + config=client_config) + return client + bucket_counter = itertools.count(1) def get_new_bucket_name(): diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index 85751bc..f3bd89c 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -69,6 +69,7 @@ from . import ( get_objects_list, get_main_kms_keyid, get_secondary_kms_keyid, + get_svc_client, nuke_prefixed_buckets, )