diff options
author | John Dickinson <me@not.mn> | 2014-03-25 14:03:38 -0700 |
---|---|---|
committer | John Dickinson <me@not.mn> | 2014-03-25 15:57:15 -0700 |
commit | 08477750a5b3261cc69c74f0cfb7d0eefae888d6 (patch) | |
tree | 2e40e89310b4ba3ed189e4c631e1206852118fe4 | |
parent | d4a1d75bfc9893207d2e36f0b01da3332d984641 (diff) | |
download | swift-08477750a5b3261cc69c74f0cfb7d0eefae888d6.tar.gz |
fix a skipped account ACLs functional test
closes bug #1292158
Change-Id: Ic74c9d698c312b484a49d759eced6860d46cf399
-rwxr-xr-x | test/functional/test_account.py | 22 |
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) |