diff options
author | Tim Burke <tim.burke@gmail.com> | 2023-03-10 13:58:02 -0800 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2023-03-10 14:07:21 -0800 |
commit | 052bcadb27d602c2b81ed8ac1a415c54b054a43c (patch) | |
tree | cf599ca13b340fd16be2ec05a825cbec00284ab0 | |
parent | 78f13be75c651814adc4f8fa23e3548737cd1005 (diff) | |
download | swift-052bcadb27d602c2b81ed8ac1a415c54b054a43c.tar.gz |
tests: Skip s3api functional tests when no s3api user configured
Change-Id: I61f141a71eddcac600058d66ddf802306df455c1
-rw-r--r-- | test/functional/s3api/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/s3api/__init__.py b/test/functional/s3api/__init__.py index 27d5602b0..4993de61d 100644 --- a/test/functional/s3api/__init__.py +++ b/test/functional/s3api/__init__.py @@ -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: |