mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add one last test, for combined range, which make ansible.inventory.expand_hosts
covered to 100%
This commit is contained in:
parent
64d35cb3b6
commit
a0b73b18c3
2 changed files with 7 additions and 0 deletions
|
@ -286,6 +286,11 @@ class TestInventory(unittest.TestCase):
|
|||
def test_alpha_end_before_beg(self):
|
||||
Inventory(os.path.join(self.test_dir, 'inventory','test_alpha_end_before_beg'))
|
||||
|
||||
def test_combined_range(self):
|
||||
i = Inventory(os.path.join(self.test_dir, 'inventory','test_combined_range'))
|
||||
hosts = i.list_hosts('test')
|
||||
expected_hosts=['host1A','host2A','host1B','host2B']
|
||||
assert sorted(hosts) == sorted(expected_hosts)
|
||||
|
||||
###################################################
|
||||
### Inventory API tests
|
||||
|
|
2
test/inventory/test_combined_range
Normal file
2
test/inventory/test_combined_range
Normal file
|
@ -0,0 +1,2 @@
|
|||
[test]
|
||||
host[1:2][A:B]
|
Loading…
Reference in a new issue