summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Short <chucks@redhat.com>2018-08-22 08:22:19 -0400
committerChuck Short <chucks@redhat.com>2018-08-22 08:22:48 -0400
commit843bf52beaf7addbb346789664fd34a3a765efe8 (patch)
treec8de9700fc53a65dfacb853c6ba7cb88a210c8f0
parent9657073262fd5ff264328312660ccbcfafba17cd (diff)
Remove stub_out_registry_server method
The stub_out_registry_server method is not being used so remove it. Change-Id: I9b4c381caceb6da1d0736ae441fb6193b503a4a7 Signed-off-by: Chuck Short <chucks@redhat.com>
Notes
Notes (review): Code-Review+2: Sean McGinnis <sean.mcginnis@gmail.com> Code-Review+1: Piotr Bielak <piotr.bielak@corp.ovh.com> Code-Review+2: Abhishek Kekane <akekane@redhat.com> Workflow+1: Abhishek Kekane <akekane@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 27 Aug 2018 10:52:13 +0000 Reviewed-on: https://review.openstack.org/594942 Project: openstack/glance Branch: refs/heads/master
-rw-r--r--glance/tests/stubs.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/glance/tests/stubs.py b/glance/tests/stubs.py
index 80bf5c8..5aa027a 100644
--- a/glance/tests/stubs.py
+++ b/glance/tests/stubs.py
@@ -193,26 +193,3 @@ def stub_out_registry_and_store_server(stubs, base_dir, **kwargs):
193 glance.common.client.BaseClient._sendable) 193 glance.common.client.BaseClient._sendable)
194 stubs.Set(glance.common.client.BaseClient, '_sendable', 194 stubs.Set(glance.common.client.BaseClient, '_sendable',
195 fake_sendable) 195 fake_sendable)
196
197
198def stub_out_registry_server(stubs, **kwargs):
199 """Mocks calls to 127.0.0.1 on 9191 for testing.
200
201 Done so that a real Glance Registry server does not need to be up and
202 running.
203 """
204 def fake_get_connection_type(client):
205 """Returns the proper connection type."""
206 DEFAULT_REGISTRY_PORT = 9191
207
208 if (client.port == DEFAULT_REGISTRY_PORT and
209 client.host == '0.0.0.0'):
210 rserver = kwargs.pop("registry", None)
211 return FakeRegistryConnection(registry=rserver)
212
213 def fake_image_iter(self):
214 for i in self.response.app_iter:
215 yield i
216
217 stubs.Set(glance.common.client.BaseClient, 'get_connection_type',
218 fake_get_connection_type)