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
This commit is contained in:
Adit Sarfaty 2018-10-24 20:10:31 +03:00
parent f17bc33284
commit 22d5109c48

View File

@ -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