Mock creation of ~/.tripleo directory
It's already specifically tested in test_utils.py and was leaving ~/.tripleo directories on developer machines after running the tests. Randomly failing to create the directory would also sometime cause other unit tests to fail. Change-Id: I54c5dfd98a71c2544215ececc61d28cbd17218a6 Closes-Bug: #1732751 Closes-Bug: #1704380
This commit is contained in:
parent
5f4c522738
commit
176349dd3d
|
@ -51,6 +51,12 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||
tempfile.NamedTemporaryFile(mode='w', delete=False).name)
|
||||
self.tmp_dir = self.useFixture(fixtures.TempDir())
|
||||
|
||||
# Mock the history command to avoid leaking files
|
||||
history_patcher = mock.patch('tripleoclient.utils.store_cli_param',
|
||||
autospec=True)
|
||||
history_patcher.start()
|
||||
self.addCleanup(history_patcher.stop)
|
||||
|
||||
def tearDown(self):
|
||||
super(TestDeployOvercloud, self).tearDown()
|
||||
os.unlink(self.parameter_defaults_env_file)
|
||||
|
|
Loading…
Reference in New Issue