Merge "Mock creation of ~/.tripleo directory"

This commit is contained in:
Zuul 2017-11-21 21:16:27 +00:00 committed by Gerrit Code Review
commit 0ba5875d7a
1 changed files with 6 additions and 0 deletions

View File

@ -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)