From 78bbd8fd0d54c8203ced7d81c32bdd421849ceee Mon Sep 17 00:00:00 2001 From: Martin André Date: Mon, 3 Jul 2017 18:02:35 +0200 Subject: Add new --skip-existing option to kolla-build This new option allows to skip images that are already present in the docker cache. Change-Id: I202c70864f8aa86abd882240beb7f6525963e625 Closes-Bug: #1694302 --- kolla/tests/test_build.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kolla/tests') diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index c1d17cfdb..8ace0622c 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -227,6 +227,9 @@ class KollaWorkerTest(base.TestCase): self.images = [image, image_child, image_unmatched, image_error, image_built] + patcher = mock.patch('docker.APIClient') + self.addCleanup(patcher.stop) + self.mock_client = patcher.start() def test_supported_base_type(self): rh_base = ['centos', 'oraclelinux', 'rhel'] @@ -409,7 +412,8 @@ class MainTest(base.TestCase): self.assertEqual(1, result) @mock.patch('sys.argv') - def test_run_build(self, mock_sys): + @mock.patch('docker.APIClient') + def test_run_build(self, mock_client, mock_sys): result = build.run_build() self.assertTrue(result) -- cgit v1.2.3