Merge pull request #271 from cbodley/wip-bucket-location

skip bucket location tests if no api_name is configured
This commit is contained in:
Ali Maredia 2019-07-09 14:25:52 -04:00 committed by GitHub
commit b586f0170d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -26,7 +26,8 @@ user_id = testid
# main email set in vstart.sh # main email set in vstart.sh
email = tester@ceph.com email = tester@ceph.com
api_name = "" # zonegroup api_name for bucket location
api_name = default
## main AWS access key ## main AWS access key
access_key = 0555b35654ad1656d804 access_key = 0555b35654ad1656d804

View file

@ -4191,10 +4191,12 @@ def test_bucket_create_exists():
@attr(method='get') @attr(method='get')
@attr(operation='get location') @attr(operation='get location')
def test_bucket_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() bucket_name = get_new_bucket_name()
client = get_client() client = get_client()
location_constraint = get_main_api_name()
client.create_bucket(Bucket=bucket_name, CreateBucketConfiguration={'LocationConstraint': location_constraint}) client.create_bucket(Bucket=bucket_name, CreateBucketConfiguration={'LocationConstraint': location_constraint})
response = client.get_bucket_location(Bucket=bucket_name) response = client.get_bucket_location(Bucket=bucket_name)