diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2016-01-15 15:48:28 +0000 |
|---|---|---|
| committer | Jeffrey Zhang <jeffrey.zhang@99cloud.net> | 2016-02-12 06:00:20 +0000 |
| commit | 477fc18bd0febb2d53c0c5053ccff76ae1589d25 (patch) | |
| tree | b3af58dd851cc6532c3b6fae500cde79fb771562 /kolla/tests/base.py | |
| parent | 013d21119f5cd2283c21e0b5d1d668fb2f44dbd3 (diff) | |
| download | kolla-477fc18bd0febb2d53c0c5053ccff76ae1589d25.tar.gz kolla-477fc18bd0febb2d53c0c5053ccff76ae1589d25.zip | |
Fix image plugin functionality for oslo.config
The new oslo.config style parsing for kolla-build.conf stopped plugins
from working. This patch fixes it and adds a unit test.
Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Closes-Bug: 1534556
Change-Id: I135797c733ae0cae040a009c364073769b19e4eb
Diffstat (limited to 'kolla/tests/base.py')
| -rw-r--r-- | kolla/tests/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kolla/tests/base.py b/kolla/tests/base.py index e08adc39b..0ac1467cc 100644 --- a/kolla/tests/base.py +++ b/kolla/tests/base.py @@ -11,6 +11,9 @@ # limitations under the License. import os + +import fixtures +import mock from oslo_config import cfg from oslotest import base as oslotest_base @@ -30,6 +33,11 @@ class TestCase(oslotest_base.BaseTestCase): default_config_files = self.get_default_config_files() common_config.parse(self.conf, [], default_config_files=default_config_files) + # NOTE(jeffrey4l): mock the _get_image_dir method to return a fake + # docker images dir + self.useFixture(fixtures.MockPatch( + 'kolla.cmd.build.KollaWorker._get_images_dir', + mock.Mock(return_value=os.path.join(TESTS_ROOT, 'docker')))) def get_default_config_files(self): if self.config_file: |
