Tests update FakeKeystoneClient to align user_id and trustor
When creating the dummy trust context, we return an arbitrary hard-coded trustor_user_id, which makes testing we do things with the trustor correctly difficult, so instead return the user_id passed into the client (as this is what the trustor id will be when real create_trust_context calls happen) Change-Id: I280b820977bfc533126fe392e002210a996311f0
This commit is contained in:
parent
35d7465c11
commit
4d42c7c389
@ -135,7 +135,7 @@ class FakeKeystoneClient(object):
|
|||||||
password=self.password,
|
password=self.password,
|
||||||
is_admin=False,
|
is_admin=False,
|
||||||
trust_id='atrust',
|
trust_id='atrust',
|
||||||
trustor_user_id='auser123')
|
trustor_user_id=self.user_id)
|
||||||
|
|
||||||
def delete_trust(self, trust_id):
|
def delete_trust(self, trust_id):
|
||||||
pass
|
pass
|
||||||
|
@ -3630,7 +3630,7 @@ class StackTest(HeatTestCase):
|
|||||||
|
|
||||||
self.m.StubOutWithMock(keystone.KeystoneClientPlugin, '_create')
|
self.m.StubOutWithMock(keystone.KeystoneClientPlugin, '_create')
|
||||||
keystone.KeystoneClientPlugin._create().AndReturn(
|
keystone.KeystoneClientPlugin._create().AndReturn(
|
||||||
FakeKeystoneClient())
|
FakeKeystoneClient(user_id='auser123'))
|
||||||
self.m.ReplayAll()
|
self.m.ReplayAll()
|
||||||
|
|
||||||
self.stack = parser.Stack(
|
self.stack = parser.Stack(
|
||||||
|
Loading…
Reference in New Issue
Block a user