Merge "Do not use service catalog for cache client"
This commit is contained in:
commit
e97b9f611c
@ -128,4 +128,5 @@ def get_client(host, port=None, timeout=None, use_ssl=False, username=None,
|
||||
auth_token=auth_token or
|
||||
os.getenv('OS_TOKEN'),
|
||||
creds=creds,
|
||||
insecure=insecure)
|
||||
insecure=insecure,
|
||||
configure_via_auth=False)
|
||||
|
@ -116,6 +116,15 @@ class GetClientTestCase(utils.BaseTestCase):
|
||||
).creds
|
||||
self.assertEqual(expected_creds, creds)
|
||||
|
||||
def test_get_client_using_provided_host(self):
|
||||
cli = client.get_client(self.host)
|
||||
cli._do_request = mock.MagicMock()
|
||||
cli.configure_from_url = mock.MagicMock()
|
||||
cli.auth_plugin.management_url = mock.MagicMock()
|
||||
cli.do_request("GET", "/queued_images")
|
||||
self.assertFalse(cli.configure_from_url.called)
|
||||
self.assertFalse(client.get_client(self.host).configure_via_auth)
|
||||
|
||||
def test_get_client_client_configuration_error(self):
|
||||
self.assertRaises(exception.ClientConfigurationError,
|
||||
client.get_client, self.host, username='name',
|
||||
|
Loading…
Reference in New Issue
Block a user