Simplify default config test
When run in parallel, there is a race condition in which the cleanup of the generated sample config file may happen while another unit test is trying to read from it, causing the test to fail[1]. Since both test_config_default and test_profiler_config_default are simply asserting properties of the default config file and not testing different corner cases, it's simplest to combine the two tests and not worry about when and how the sample file is cleaned up. [1] https://zuul.opendev.org/t/openstack/build/d870ff2db4b74c21a66b756f4377a0c4/artifacts Change-Id: If5de3b3499ea73c601e8793cba4fef3441d72f5d
This commit is contained in:
parent
db25e505a3
commit
5f546d03ad
|
@ -39,9 +39,7 @@ class ConfigTestCase(unit.TestCase):
|
|||
def test_config_default(self):
|
||||
self.assertIsNone(CONF.auth.password)
|
||||
self.assertIsNone(CONF.auth.token)
|
||||
|
||||
def test_profiler_config_default(self):
|
||||
"""Check config.set_config_defaults() has set [profiler]enabled."""
|
||||
# Check config.set_config_defaults() has set [profiler]enabled.
|
||||
self.assertEqual(False, CONF.profiler.enabled)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue