Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52490 from dwoz/issue_52134
Fix pillar include regression
- Loading branch information
Showing
11 changed files
with
78 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include: | ||
- 'glob_include*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
glob-a: | ||
- 'Entry A' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
glob-b: | ||
- 'Entry B' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
- 'Entry A' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
b: | ||
- 'Entry B' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include: | ||
- include-a: | ||
key: element:a | ||
- include-b: | ||
key: element:b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ base: | |
- generic | ||
- blackout | ||
- sdb | ||
- include | ||
- glob_include | ||
'sub_minion': | ||
- sdb | ||
- generic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
''' | ||
Pillar include tests | ||
''' | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from tests.support.case import ModuleCase | ||
|
||
|
||
class PillarIncludeTest(ModuleCase): | ||
|
||
def test_pillar_include(self): | ||
''' | ||
Test pillar include | ||
''' | ||
ret = self.minion_run('pillar.items') | ||
assert 'a' in ret['element'] | ||
assert ret['element']['a'] == {'a': ['Entry A']} | ||
assert 'b' in ret['element'] | ||
assert ret['element']['b'] == {'b': ['Entry B']} | ||
|
||
def test_pillar_glob_include(self): | ||
''' | ||
Test pillar include via glob pattern | ||
''' | ||
ret = self.minion_run('pillar.items') | ||
assert 'glob-a' in ret | ||
assert ret['glob-a'] == ['Entry A'] | ||
assert 'glob-b' in ret | ||
assert ret['glob-b'] == ['Entry B'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters