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:30 +0000 |
commit | b56a5276940a19f0053f595ab72d9c9bd752c59f (patch) | |
tree | 5ae6f55848de5052f4d2dc594428324c9ea54970 | |
parent | 76ceaa33b74fadc5711fa282540346ca17755586 (diff) | |
download | neutron-b56a5276940a19f0053f595ab72d9c9bd752c59f.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 ec3645971d..f2cdf0efa0 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() |