skip bucket location test if no api_name is configured

Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2019-04-05 17:08:59 -04:00
parent 75182b7e03
commit 250122e17d

View file

@ -3419,10 +3419,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)