From 22d5109c4842527499d85adbbad5dcfd70f2c22e Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Wed, 24 Oct 2018 20:10:31 +0300 Subject: [PATCH] Fix octavia listener unit tests Commit 47b24d7669a5ea755cd099bba6af088ef1f4c572 broke the octavia listener test due to changes of the octavia config initialization. This patch uses mock to skip the problem, since octavia & neutron configurations should not be loaded togather. Change-Id: I9ae6a860d060181a647f891cf46be2ed2ffb9423 --- vmware_nsx/tests/unit/services/lbaas/test_octavia_driver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/tests/unit/services/lbaas/test_octavia_driver.py b/vmware_nsx/tests/unit/services/lbaas/test_octavia_driver.py index 67e91fc56e..4b361e5587 100644 --- a/vmware_nsx/tests/unit/services/lbaas/test_octavia_driver.py +++ b/vmware_nsx/tests/unit/services/lbaas/test_octavia_driver.py @@ -20,8 +20,10 @@ import testtools from oslo_utils import uuidutils code_ok = True -# Skip duplications between Octavia & Neutron configurations -with mock.patch('oslo_config.cfg.ConfigOpts.import_group'): +# Skip duplications between Octavia & Neutron configurations and missing +# configuration groups +with mock.patch('oslo_config.cfg.ConfigOpts.import_group'),\ + mock.patch('oslo_config.cfg.ConfigOpts.__getattr__'): try: from octavia.api.drivers import data_models from vmware_nsx.services.lbaas.octavia import octavia_driver as driver