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/test_build.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/test_build.py')
| -rw-r--r-- | kolla/tests/test_build.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index 634fa3abb..b014bc3b1 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -107,6 +107,8 @@ class WorkerThreadTest(base.TestCase): class KollaWorkerTest(base.TestCase): + config_file = 'default.conf' + def test_supported_base_type(self): rh_base = ['fedora', 'centos', 'oraclelinux', 'rhel'] rh_type = ['source', 'binary', 'rdo', 'rhos'] @@ -128,3 +130,25 @@ class KollaWorkerTest(base.TestCase): self.conf.set_override('install_type', install_type) self.assertRaises(build.KollaMismatchBaseTypeException, build.KollaWorker, self.conf) + + def test_build_image_list_adds_plugins(self): + + self.conf.set_override('install_type', 'source') + + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + kolla.create_dockerfiles() + kolla.build_image_list() + expected_plugin = { + 'name': 'neutron-server-plugin-networking-arista', + 'reference': 'master', + 'source': 'https://github.com/openstack/networking-arista', + 'type': 'git' + } + for image in kolla.images: + if image['name'] == 'neutron-server': + self.assertEqual(image['plugins'][0], expected_plugin) + break + else: + self.fail('Can not find the expected neutron arista plugin') |
