Browse Source

Fix unit tests failed

Currently, zuul test job always failed, it is because the
attribute in SessionClient of nova client has been removed
and use endpoint_override instead, this patch will fix it.

Change-Id: I3101d829ee4382d95acbdc6b756de2b8619b254f
changes/49/680849/1
jiaopengju 2 years ago
parent
commit
487832ed13
  1. 4
      karbor/tests/unit/plugins/test_network_protectable_plugin.py

4
karbor/tests/unit/plugins/test_network_protectable_plugin.py

@ -82,7 +82,7 @@ class NetworkProtectablePluginTest(base.TestCase):
self.assertEqual('http://127.0.0.1:9696',
neutronclient.httpclient.endpoint_url)
self.assertEqual('http://127.0.0.1:8774/v2.1/abcd',
novaclient.client.management_url)
novaclient.client.endpoint_override)
@mock.patch('karbor.services.protection.client_factory.ClientFactory.'
'_generate_session')
@ -101,7 +101,7 @@ class NetworkProtectablePluginTest(base.TestCase):
self.assertEqual('http://127.0.0.1:9696',
neutronclient.httpclient.endpoint_url)
self.assertEqual('http://127.0.0.1:8774/v2.1/abcd',
novaclient.client.management_url)
novaclient.client.endpoint_override)
def test_get_resource_type(self):
plugin = NetworkProtectablePlugin(self._context)

Loading…
Cancel
Save