Merge "Don't set context auth_token in heat_keystoneclient"

This commit is contained in:
Jenkins 2014-06-20 12:47:03 +00:00 committed by Gerrit Code Review
commit 59be7efed1
2 changed files with 2 additions and 3 deletions

@ -173,9 +173,6 @@ class KeystoneClientV3(object):
if not client.auth_ref.trust_scoped:
LOG.error(_("trust token re-scoping failed!"))
raise exception.AuthorizationFailure()
# All OK so update the context with the token
self.context.auth_token = client.auth_ref.auth_token
self.context.auth_url = kwargs.get('auth_url')
# Sanity check that impersonation is effective
if self.context.trustor_user_id != client.auth_ref.user_id:
LOG.error(_("Trust impersonation failed"))

@ -400,6 +400,7 @@ class KeystoneClientTest(HeatTestCase):
heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
client = heat_ks_client.client
self.assertIsNotNone(client)
self.assertIsNone(ctx.trust_id)
def test_init_v3_bad_nocreds(self):
@ -547,6 +548,7 @@ class KeystoneClientTest(HeatTestCase):
ctx.trustor_user_id = 'trustor_user_id'
heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
self.assertIsNotNone(heat_ks_client.client)
self.assertIsNone(ctx.auth_token)
def test_trust_init_fail(self):