Browse Source

Adapt to default val change of oslo.cfg enforce_type

The default value of oslo config opitons 'enforce_type' parameter
changed from "False" to "True" [1]. This caused test failures in
networking-dpm where the physical_network_adapter_mappings are not
set to a valid value.

[1] 827bd738dc

Change-Id: I3c318c8f1cbefb6105d170a815405c96ae9c029c
Closes-Bug: #1690753
Andreas Scheuring 1 year ago
parent
commit
6760d54166
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      networking_dpm/tests/unit/conf/test_config.py

+ 6
- 2
networking_dpm/tests/unit/conf/test_config.py View File

@@ -23,18 +23,22 @@ from networking_dpm.tests import base
23 23
 
24 24
 class TestConfig(base.BaseTestCase):
25 25
     def test_config(self):
26
+        mappings = ["physnet:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:0"]
27
+        mappings_parsed =\
28
+            [('physnet', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '0')]
29
+
26 30
         cfg.CONF.set_override('hmc', 'hmc-ip', 'dpm')
27 31
         cfg.CONF.set_override('hmc_username', 'username', 'dpm')
28 32
         cfg.CONF.set_override('hmc_password', 'password', 'dpm')
29 33
         cfg.CONF.set_override('cpc_object_id', 'oid', 'dpm')
30
-        cfg.CONF.set_override('physical_network_adapter_mappings', 'mapping',
34
+        cfg.CONF.set_override('physical_network_adapter_mappings', mappings,
31 35
                               'dpm')
32 36
 
33 37
         self.assertEqual('hmc-ip', cfg.CONF.dpm.hmc)
34 38
         self.assertEqual('username', cfg.CONF.dpm.hmc_username)
35 39
         self.assertEqual('password', cfg.CONF.dpm.hmc_password)
36 40
         self.assertEqual('oid', cfg.CONF.dpm.cpc_object_id)
37
-        self.assertEqual('mapping',
41
+        self.assertEqual(mappings_parsed,
38 42
                          cfg.CONF.dpm.physical_network_adapter_mappings)
39 43
 
40 44
     def test_list_opts(self):

Loading…
Cancel
Save