From 8b38c4d5c9f62b7cb42d8e885cea56f188ab9110 Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Fri, 17 Feb 2017 17:48:47 +0100 Subject: Add work-dir command-line option The working directory was previously generated as a temporary one, but there may be cases when we want to specify a directory, for example if we want to generate the Dockerfiles and then do some parsing on them. Change-Id: Ic332328913924bcb3d0dfa4d473e796050fc14b3 --- kolla/tests/test_build.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kolla/tests') diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 1a1e019d5..7bcd2de7f 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -349,6 +349,13 @@ class KollaWorkerTest(base.TestCase): results = kolla.summary() self.assertEqual(None, results['failed'][0]['status']) + @mock.patch('shutil.copytree') + def test_work_dir(self, copytree_mock): + self.conf.set_override('work_dir', '/tmp/foo') + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + self.assertEqual('/tmp/foo/docker', kolla.working_dir) + class MainTest(base.TestCase): -- cgit v1.2.3