diff options
author | Slawek Kaplonski <skaplons@redhat.com> | 2022-10-01 22:04:23 +0200 |
---|---|---|
committer | Slawek Kaplonski <skaplons@redhat.com> | 2022-10-10 12:34:10 +0000 |
commit | e0a14d6419b506da133c59d16a561f67cc641719 (patch) | |
tree | 27fe9876824505dad7531ecfd9c361fd4840efae | |
parent | c97b6c460da654b2f60344e0778cdccee99ad6c2 (diff) | |
download | neutron-e0a14d6419b506da133c59d16a561f67cc641719.tar.gz |
Fix ipam_pluggable_backend unit tests module
This module couldn't be run alone due to missing registratration of
the "ipam_driver" config option from the core neutron configuration.
To solve that problem there is test plugin configured for those tests
and it registers that option which is necessary.
Change-Id: Iffdca967340c01d4e8c063c516d0d5441750c653
(cherry picked from commit a3e68e8f76e2792c30d1527bb20ee5961c6a8a53)
-rw-r--r-- | neutron/tests/unit/db/test_ipam_pluggable_backend.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/neutron/tests/unit/db/test_ipam_pluggable_backend.py b/neutron/tests/unit/db/test_ipam_pluggable_backend.py index b3847646b7..c869bb1458 100644 --- a/neutron/tests/unit/db/test_ipam_pluggable_backend.py +++ b/neutron/tests/unit/db/test_ipam_pluggable_backend.py @@ -63,9 +63,11 @@ class TestIpamSubnetPool(UseIpamMixin, test_db_base.TestSubnetPoolsV2): class TestDbBasePluginIpam(test_db_base.NeutronDbPluginV2TestCase): - def setUp(self): + def setUp(self, plugin=None): + if not plugin: + plugin = 'neutron.tests.unit.db.test_ipam_backend_mixin.TestPlugin' + super(TestDbBasePluginIpam, self).setUp(plugin=plugin) cfg.CONF.set_override("ipam_driver", 'internal') - super(TestDbBasePluginIpam, self).setUp() self.tenant_id = uuidutils.generate_uuid() self.subnet_id = uuidutils.generate_uuid() self.admin_context = ncontext.get_admin_context() |