Fix testing for the write-devstack-local-conf role
The test_plugin_deps function in the test code for the write-devstack-local-conf role was missing the import part of actually executing the code under test and asserting the expected result. Change-Id: I125870b13d2581cdec0dede11157b19b702565cd
This commit is contained in:
parent
a88a22969c
commit
6d103a7ff8
@ -104,6 +104,22 @@ class TestDevstackLocalConf(unittest.TestCase):
|
||||
plugins=plugins,
|
||||
base_dir=self.tmpdir,
|
||||
path=os.path.join(self.tmpdir, 'test.local.conf'))
|
||||
lc = LocalConf(p.get('localrc'),
|
||||
p.get('local_conf'),
|
||||
p.get('base_services'),
|
||||
p.get('services'),
|
||||
p.get('plugins'),
|
||||
p.get('base_dir'),
|
||||
p.get('projects'),
|
||||
p.get('project'))
|
||||
lc.write(p['path'])
|
||||
|
||||
plugins = []
|
||||
with open(p['path']) as f:
|
||||
for line in f:
|
||||
if line.startswith('enable_plugin'):
|
||||
plugins.append(line.split()[1])
|
||||
self.assertEqual(['foo', 'bar'], plugins)
|
||||
|
||||
def test_libs_from_git(self):
|
||||
"Test that LIBS_FROM_GIT is auto-generated"
|
||||
|
Loading…
x
Reference in New Issue
Block a user