diff --git a/ironic_python_agent/tests/unit/test_agent.py b/ironic_python_agent/tests/unit/test_agent.py index 204bfbab7..1f49503b9 100644 --- a/ironic_python_agent/tests/unit/test_agent.py +++ b/ironic_python_agent/tests/unit/test_agent.py @@ -180,7 +180,7 @@ class TestBaseAgent(ironic_agent_base.IronicAgentTest): @mock.patch.object(hardware, 'dispatch_to_managers', autospec=True) @mock.patch('wsgiref.simple_server.make_server', autospec=True) def test_run(self, mock_make_server, mock_dispatch, mock_wait): - CONF.set_override('inspection_callback_url', '', enforce_type=True) + CONF.set_override('inspection_callback_url', '') wsgi_server = mock_make_server.return_value wsgi_server.start.side_effect = KeyboardInterrupt() @@ -219,8 +219,7 @@ class TestBaseAgent(ironic_agent_base.IronicAgentTest): autospec=True) def test_run_with_inspection(self, mock_list_hardware, mock_make_server, mock_dispatch, mock_inspector, mock_wait): - CONF.set_override('inspection_callback_url', 'http://foo/bar', - enforce_type=True) + CONF.set_override('inspection_callback_url', 'http://foo/bar') wsgi_server = mock_make_server.return_value wsgi_server.start.side_effect = KeyboardInterrupt() @@ -277,8 +276,7 @@ class TestBaseAgent(ironic_agent_base.IronicAgentTest): # agent starts, ensure that the inspection will be called and wsgi # server will work as usual. Also, make sure api_client and heartbeater # will not be initialized in this case. - CONF.set_override('inspection_callback_url', 'http://foo/bar', - enforce_type=True) + CONF.set_override('inspection_callback_url', 'http://foo/bar') self.agent = agent.IronicPythonAgent(None, agent.Host('203.0.113.1', 9990), @@ -330,8 +328,7 @@ class TestBaseAgent(ironic_agent_base.IronicAgentTest): # the agent starts, ensure that the inspection will be skipped and wsgi # server will work as usual. Also, make sure api_client and heartbeater # will not be initialized in this case. - CONF.set_override('inspection_callback_url', None, - enforce_type=True) + CONF.set_override('inspection_callback_url', None) self.agent = agent.IronicPythonAgent(None, agent.Host('203.0.113.1', 9990), @@ -393,7 +390,7 @@ class TestBaseAgent(ironic_agent_base.IronicAgentTest): @mock.patch('wsgiref.simple_server.make_server', autospec=True) def test_run_with_sleep(self, mock_make_server, mock_dispatch, mock_load_managers, mock_sleep, mock_wait): - CONF.set_override('inspection_callback_url', '', enforce_type=True) + CONF.set_override('inspection_callback_url', '') wsgi_server = mock_make_server.return_value wsgi_server.start.side_effect = KeyboardInterrupt() diff --git a/ironic_python_agent/tests/unit/test_hardware.py b/ironic_python_agent/tests/unit/test_hardware.py index 7eb06bf69..69acc0812 100644 --- a/ironic_python_agent/tests/unit/test_hardware.py +++ b/ironic_python_agent/tests/unit/test_hardware.py @@ -1633,7 +1633,7 @@ class TestGenericHardwareManager(base.IronicAgentTest): def test_evaluate_hw_waits_for_disks_configured(self, mocked_root_dev, mocked_sleep, mocked_block_dev): - CONF.set_override('disk_wait_attempts', '2', enforce_type=True) + CONF.set_override('disk_wait_attempts', '2') mocked_root_dev.side_effect = [ errors.DeviceNotFound('boom'), @@ -1670,7 +1670,7 @@ class TestGenericHardwareManager(base.IronicAgentTest): def test_evaluate_hw_disks_timeout_configured(self, mocked_root_dev, mocked_sleep, mocked_block_dev): - CONF.set_override('disk_wait_delay', '5', enforce_type=True) + CONF.set_override('disk_wait_delay', '5') mocked_root_dev.side_effect = errors.DeviceNotFound('boom') self.hardware.evaluate_hardware_support() diff --git a/ironic_python_agent/tests/unit/test_inspector.py b/ironic_python_agent/tests/unit/test_inspector.py index 284b3f6f4..a6c3ac5f6 100644 --- a/ironic_python_agent/tests/unit/test_inspector.py +++ b/ironic_python_agent/tests/unit/test_inspector.py @@ -65,9 +65,8 @@ class TestMisc(base.IronicAgentTest): class TestInspect(base.IronicAgentTest): def setUp(self): super(TestInspect, self).setUp() - CONF.set_override('inspection_callback_url', 'http://foo/bar', - enforce_type=True) - CONF.set_override('inspection_collectors', '', enforce_type=True) + CONF.set_override('inspection_callback_url', 'http://foo/bar') + CONF.set_override('inspection_collectors', '') self.mock_collect = AcceptingFailure() self.mock_ext = mock.Mock(spec=['plugin', 'name'], plugin=self.mock_collect) @@ -84,8 +83,7 @@ class TestInspect(base.IronicAgentTest): mock_setup_ipmi.assert_called_once_with(mock_call.return_value) def test_collectors_option(self, mock_ext_mgr, mock_call, mock_setup_ipmi): - CONF.set_override('inspection_collectors', 'foo,bar', - enforce_type=True) + CONF.set_override('inspection_collectors', 'foo,bar') mock_ext_mgr.return_value = [ mock.Mock(spec=['name', 'plugin'], plugin=AcceptingFailure()), mock.Mock(spec=['name', 'plugin'], plugin=AcceptingFailure()), @@ -109,8 +107,7 @@ class TestInspect(base.IronicAgentTest): self.assertFalse(mock_setup_ipmi.called) def test_extensions_failed(self, mock_ext_mgr, mock_call, mock_setup_ipmi): - CONF.set_override('inspection_collectors', 'foo,bar', - enforce_type=True) + CONF.set_override('inspection_collectors', 'foo,bar') mock_ext_mgr.side_effect = RuntimeError('boom') self.assertRaisesRegex(RuntimeError, 'boom', inspector.inspect) @@ -134,8 +131,7 @@ class TestInspect(base.IronicAgentTest): class TestCallInspector(base.IronicAgentTest): def setUp(self): super(TestCallInspector, self).setUp() - CONF.set_override('inspection_callback_url', 'url', - enforce_type=True) + CONF.set_override('inspection_callback_url', 'url') def test_ok(self, mock_post): failures = utils.AccumulatedFailures()