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
| ... | ... |
@@ -104,6 +104,22 @@ class TestDevstackLocalConf(unittest.TestCase): |
| 104 | 104 |
plugins=plugins, |
| 105 | 105 |
base_dir=self.tmpdir, |
| 106 | 106 |
path=os.path.join(self.tmpdir, 'test.local.conf')) |
| 107 |
+ lc = LocalConf(p.get('localrc'),
|
|
| 108 |
+ p.get('local_conf'),
|
|
| 109 |
+ p.get('base_services'),
|
|
| 110 |
+ p.get('services'),
|
|
| 111 |
+ p.get('plugins'),
|
|
| 112 |
+ p.get('base_dir'),
|
|
| 113 |
+ p.get('projects'),
|
|
| 114 |
+ p.get('project'))
|
|
| 115 |
+ lc.write(p['path']) |
|
| 116 |
+ |
|
| 117 |
+ plugins = [] |
|
| 118 |
+ with open(p['path']) as f: |
|
| 119 |
+ for line in f: |
|
| 120 |
+ if line.startswith('enable_plugin'):
|
|
| 121 |
+ plugins.append(line.split()[1]) |
|
| 122 |
+ self.assertEqual(['foo', 'bar'], plugins) |
|
| 107 | 123 |
|
| 108 | 124 |
def test_libs_from_git(self): |
| 109 | 125 |
"Test that LIBS_FROM_GIT is auto-generated" |