summaryrefslogtreecommitdiff
path: root/heat/tests/test_signal.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2017-10-16 16:18:44 -0400
committerDan Prince <dprince@redhat.com>2017-10-24 11:45:31 -0400
commit14b0451fc9ebfd8e775b2aa9c8feac31e456a9ad (patch)
treec7066f3238bf66de63d69d31054da26833343ac7 /heat/tests/test_signal.py
parent1f73478e3280ab35ad433695a774a5ba64aa2b9b (diff)
downloadheat-14b0451fc9ebfd8e775b2aa9c8feac31e456a9ad.tar.gz
Move FakeKeystoneClient to engine.clients
Add the ability to consume FakeKeystoneClient class as a client module. This avoids extra dependencies on the Python mox/mox3 libraries at runtime and allows the end user to wire in the custom class by simply making the following config setting: keystone_backend = heat.engine.clients.os.keystone.fake_keystoneclient.FakeKeystoneClient This use case for this is the TripleO undercloud installer which uses a heat-all process to transform heat templates into Ansible playbooks. Previously we leveraged a "fake_keystone" service as multiple applications and binaries required keystone dependencies. (Both Heat, os-collect-config, and some openstackclients wanted a fully version of keystone running) Now that we've streamlined these dependencies allowing heat to use a fake KeystoneClient library shim instead of the full fake_keystone process is much lighter and avoids the security concerns of the extra socket. This patch allows us to do all of this without installing extra test time dependencies on mox/mox3. Change-Id: I03f1789957ba157871fd13164592116d7fcdabe4 Closes-bug: #1723639
Diffstat (limited to 'heat/tests/test_signal.py')
-rw-r--r--heat/tests/test_signal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/heat/tests/test_signal.py b/heat/tests/test_signal.py
index a5bdaf600..ec4f17e10 100644
--- a/heat/tests/test_signal.py
+++ b/heat/tests/test_signal.py
@@ -22,13 +22,13 @@ from heat.common import exception
from heat.common import template_format
from heat.db.sqlalchemy import models
from heat.engine.clients.os import heat_plugin
+from heat.engine.clients.os.keystone import fake_keystoneclient as fake_ks
from heat.engine.clients.os import swift
from heat.engine import scheduler
from heat.engine import stack as stk
from heat.engine import template
from heat.objects import resource_data as resource_data_object
from heat.tests import common
-from heat.tests import fakes
from heat.tests import generic_resource
from heat.tests import utils
@@ -467,7 +467,7 @@ class SignalTest(common.HeatTestCase):
def test_delete_not_found(self):
# Setup
- class FakeKeystoneClientFail(fakes.FakeKeystoneClient):
+ class FakeKeystoneClientFail(fake_ks.FakeKeystoneClient):
def delete_stack_user(self, name):
raise kc_exceptions.NotFound()
self.stub_keystoneclient(fake_client=FakeKeystoneClientFail())