summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-03-26 10:41:35 +0000
committerGerrit Code Review <review@openstack.org>2014-03-26 10:41:35 +0000
commit5ca889a678ef5a37fdc531bf1c5bf9a9259890ae (patch)
treece9e8a6f8d7d608c8aefa2aeeeb8e6012e929207
parentb458b44443b95bbf36f09207d838b79d9bfdd4b3 (diff)
parent08477750a5b3261cc69c74f0cfb7d0eefae888d6 (diff)
downloadswift-5ca889a678ef5a37fdc531bf1c5bf9a9259890ae.tar.gz
Merge "fix a skipped account ACLs functional test"
-rwxr-xr-xtest/functional/test_account.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/test/functional/test_account.py b/test/functional/test_account.py
index d456090d3..acd7c8aa2 100755
--- a/test/functional/test_account.py
+++ b/test/functional/test_account.py
@@ -77,21 +77,15 @@ class TestAccount(unittest.TestCase):
# Determine whether this cluster has account ACLs; if not, skip test
conn = Connection(get_config('func_test'))
conn.authenticate()
- status = conn.make_request(
- 'GET', '/info', cfg={'verbatim_path': True})
- if status // 100 != 2:
- # Can't tell if account ACLs are enabled; skip tests proactively.
+ cluster_info = conn.cluster_info()
+ if not cluster_info.get('tempauth', {}).get('account_acls'):
+ raise SkipTest
+ if 'keystoneauth' in cluster_info:
+ # Unfortunate hack -- tempauth (with account ACLs) is expected
+ # to play nice with Keystone (without account ACLs), but Zuul
+ # functest framework doesn't give us an easy way to get a
+ # tempauth user.
raise SkipTest
- else:
- cluster_info = json.loads(conn.response.read())
- if not cluster_info.get('tempauth', {}).get('account_acls'):
- raise SkipTest
- if 'keystoneauth' in cluster_info:
- # Unfortunate hack -- tempauth (with account ACLs) is expected
- # to play nice with Keystone (without account ACLs), but Zuul
- # functest framework doesn't give us an easy way to get a
- # tempauth user.
- raise SkipTest
def post(url, token, parsed, conn, headers):
new_headers = dict({'X-Auth-Token': token}, **headers)