mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28210 from terminalmage/legacy_git_pillar
Fix for ext_pillar being compiled twice in legacy git_pillar code
This commit is contained in:
commit
c8dd79d683
2 changed files with 1 additions and 16 deletions
|
@ -429,7 +429,7 @@ def _legacy_git_pillar(minion_id, repo_string, pillar_dirs):
|
|||
|
||||
pil = Pillar(opts, __grains__, minion_id, branch)
|
||||
|
||||
return pil.compile_pillar()
|
||||
return pil.compile_pillar(ext=False)
|
||||
|
||||
|
||||
def _update(branch, repo_location):
|
||||
|
|
|
@ -113,21 +113,6 @@ class PillarModuleTest(integration.ModuleCase):
|
|||
|
||||
self.assertEqual(grepo.rp_location, repo.remotes.origin.url)
|
||||
|
||||
@skipIf(HAS_GIT_PYTHON is False,
|
||||
'GitPython must be installed and >= version {0}'.format(GIT_PYTHON))
|
||||
def test_ext_pillar_env_mapping(self):
|
||||
import os
|
||||
from salt.pillar import git_pillar
|
||||
|
||||
repo_url = 'https://github.com/saltstack/pillar1.git'
|
||||
pillar = self.run_function('pillar.data')
|
||||
|
||||
for branch, env in [('dev', 'testing')]:
|
||||
repo = git_pillar._LegacyGitPillar(branch, repo_url, self.master_opts)
|
||||
|
||||
self.assertIn(repo.working_dir,
|
||||
pillar['test_ext_pillar_opts']['pillar_roots'][env])
|
||||
|
||||
if __name__ == '__main__':
|
||||
from integration import run_tests
|
||||
run_tests(PillarModuleTest)
|
||||
|
|
Loading…
Add table
Reference in a new issue