From 75182b7e03b088926d415f6b68c93d0ccd5babfd Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 5 Apr 2019 16:48:24 -0400 Subject: [PATCH 1/2] set 'api_name = default' in sample config Signed-off-by: Casey Bodley --- s3tests.conf.SAMPLE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s3tests.conf.SAMPLE b/s3tests.conf.SAMPLE index f479766..54c642f 100644 --- a/s3tests.conf.SAMPLE +++ b/s3tests.conf.SAMPLE @@ -26,7 +26,8 @@ user_id = testid # main email set in vstart.sh email = tester@ceph.com -api_name = "" +# zonegroup api_name for bucket location +api_name = default ## main AWS access key access_key = 0555b35654ad1656d804 From 250122e17d7254227bb1a27d698f28f12f39f7dc Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 5 Apr 2019 17:08:59 -0400 Subject: [PATCH 2/2] skip bucket location test if no api_name is configured Signed-off-by: Casey Bodley --- s3tests_boto3/functional/test_s3.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index f85b5e1..d38030f 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -3419,10 +3419,12 @@ def test_bucket_create_exists(): @attr(method='get') @attr(operation='get location') def test_bucket_get_location(): + location_constraint = get_main_api_name() + if not location_constraint + raise SkipTest bucket_name = get_new_bucket_name() client = get_client() - location_constraint = get_main_api_name() client.create_bucket(Bucket=bucket_name, CreateBucketConfiguration={'LocationConstraint': location_constraint}) response = client.get_bucket_location(Bucket=bucket_name)