mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix pillar unit test failures: file_roots and pillar_roots environments should be lists
This commit is contained in:
parent
fe2d46dd0c
commit
46ba72fb1c
1 changed files with 6 additions and 6 deletions
|
@ -302,13 +302,13 @@ class PillarTestCase(TestCase):
|
|||
'renderer_blacklist': [],
|
||||
'renderer_whitelist': [],
|
||||
'state_top': '',
|
||||
'pillar_roots': {'__env__': '/srv/pillar/__env__', 'base': '/srv/pillar/base'},
|
||||
'file_roots': {'base': '/srv/salt/base', 'dev': '/svr/salt/dev'},
|
||||
'pillar_roots': {'__env__': ['/srv/pillar/__env__'], 'base': ['/srv/pillar/base']},
|
||||
'file_roots': {'base': ['/srv/salt/base'], 'dev': ['/svr/salt/dev']},
|
||||
'extension_modules': '',
|
||||
}
|
||||
pillar = salt.pillar.Pillar(opts, {}, 'mocked-minion', 'base', pillarenv='dev')
|
||||
self.assertEqual(pillar.opts['file_roots'],
|
||||
{'base': '/srv/pillar/base', 'dev': '/srv/pillar/__env__'})
|
||||
{'base': ['/srv/pillar/base'], 'dev': ['/srv/pillar/__env__']})
|
||||
|
||||
def test_ignored_dynamic_pillarenv(self):
|
||||
opts = {
|
||||
|
@ -316,12 +316,12 @@ class PillarTestCase(TestCase):
|
|||
'renderer_blacklist': [],
|
||||
'renderer_whitelist': [],
|
||||
'state_top': '',
|
||||
'pillar_roots': {'__env__': '/srv/pillar/__env__', 'base': '/srv/pillar/base'},
|
||||
'file_roots': {'base': '/srv/salt/base', 'dev': '/svr/salt/dev'},
|
||||
'pillar_roots': {'__env__': ['/srv/pillar/__env__'], 'base': ['/srv/pillar/base']},
|
||||
'file_roots': {'base': ['/srv/salt/base'], 'dev': ['/svr/salt/dev']},
|
||||
'extension_modules': '',
|
||||
}
|
||||
pillar = salt.pillar.Pillar(opts, {}, 'mocked-minion', 'base', pillarenv='base')
|
||||
self.assertEqual(pillar.opts['file_roots'], {'base': '/srv/pillar/base'})
|
||||
self.assertEqual(pillar.opts['file_roots'], {'base': ['/srv/pillar/base']})
|
||||
|
||||
def test_malformed_pillar_sls(self):
|
||||
with patch('salt.pillar.compile_template') as compile_template:
|
||||
|
|
Loading…
Add table
Reference in a new issue