mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 21:54:22 -07:00
add a test to cover bound stepping in inventory
This commit is contained in:
parent
1dd3ff3879
commit
7fec9c3eba
2 changed files with 4 additions and 2 deletions
|
@ -219,9 +219,9 @@ class TestInventory(unittest.TestCase):
|
||||||
def test_complex_group_names(self):
|
def test_complex_group_names(self):
|
||||||
inventory = self.complex_inventory()
|
inventory = self.complex_inventory()
|
||||||
tests = {
|
tests = {
|
||||||
'host1': [ 'role1' ],
|
'host1': [ 'role1', 'role3' ],
|
||||||
'host2': [ 'role1', 'role2' ],
|
'host2': [ 'role1', 'role2' ],
|
||||||
'host3': [ 'role2' ]
|
'host3': [ 'role2', 'role3' ]
|
||||||
}
|
}
|
||||||
for host, roles in tests.iteritems():
|
for host, roles in tests.iteritems():
|
||||||
group_names = inventory.get_variables(host)['group_names']
|
group_names = inventory.get_variables(host)['group_names']
|
||||||
|
|
|
@ -85,3 +85,5 @@ host[1:2]
|
||||||
[role2]
|
[role2]
|
||||||
host[2:3]
|
host[2:3]
|
||||||
|
|
||||||
|
[role3]
|
||||||
|
host[1:3:2]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue