Skip to content

Commit

Permalink
Merge "fix a skipped account ACLs functional test"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 26, 2014
2 parents b458b44 + 0847775 commit 5ca889a
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions test/functional/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,15 @@ def test_tempauth_account_acls(self):
# 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)
Expand Down

0 comments on commit 5ca889a

Please sign in to comment.