Merge "tests: Skip s3api functional tests when no s3api user configured"

This commit is contained in:
Zuul 2023-04-03 19:27:59 +00:00 committed by Gerrit Code Review
commit 91d62b1879
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class S3ApiBase(unittest.TestCase):
logging.getLogger('boto').setLevel(logging.DEBUG)
def setUp(self):
if not tf.config.get('s3_access_key'):
raise SkipTest('no s3api user configured')
if 's3api' not in tf.cluster_info:
raise SkipTest('s3api middleware is not enabled')
if tf.config.get('account'):
@ -83,6 +85,8 @@ class S3ApiBase(unittest.TestCase):
class S3ApiBaseBoto3(S3ApiBase):
def setUp(self):
if not tf.config.get('s3_access_key'):
raise SkipTest('no s3api user configured')
if 's3api' not in tf.cluster_info:
raise SkipTest('s3api middleware is not enabled')
try: