diff --git a/s3tests_boto3/functional/__init__.py b/s3tests_boto3/functional/__init__.py index 54bf0d1..78109ac 100644 --- a/s3tests_boto3/functional/__init__.py +++ b/s3tests_boto3/functional/__init__.py @@ -339,6 +339,9 @@ def get_config_host(): def get_config_port(): return config.default_port +def get_config_endpoint(): + return config.default_endpoint + def get_main_aws_access_key(): return config.main_access_key diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index 13fb300..3038a84 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -50,6 +50,7 @@ from . import ( get_config_is_secure, get_config_host, get_config_port, + get_config_endpoint, get_main_aws_access_key, get_main_aws_secret_key, get_main_display_name, @@ -1360,18 +1361,8 @@ def test_object_write_file(): eq(body, 'bar') def _get_post_url(bucket_name): - protocol='http' - is_secure = get_config_is_secure() - - if is_secure is True: - protocol='https' - - host = get_config_host() - port = get_config_port() - - url = '{protocol}://{host}:{port}/{bucket_name}'.format(protocol=protocol,\ - host=host, port=port, bucket_name=bucket_name) - return url + endpoint = get_config_endpoint() + return '{endpoint}/{bucket_name}'.format(endpoint=endpoint, bucket_name=bucket_name) @attr(resource='object') @attr(method='post')