mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add a test to verify ansible detect invalid range
This commit is contained in:
parent
7fec9c3eba
commit
2aea8a6368
2 changed files with 5 additions and 0 deletions
|
@ -270,6 +270,9 @@ class TestInventory(unittest.TestCase):
|
||||||
hosts = inventory.list_hosts("nc:&triangle:!tri_c")
|
hosts = inventory.list_hosts("nc:&triangle:!tri_c")
|
||||||
self.compare(hosts, ['tri_a', 'tri_b'])
|
self.compare(hosts, ['tri_a', 'tri_b'])
|
||||||
|
|
||||||
|
@raises(errors.AnsibleError)
|
||||||
|
def test_invalid_range(self):
|
||||||
|
Inventory(os.path.join(self.test_dir, 'inventory','test_incorrect_range'))
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
### Inventory API tests
|
### Inventory API tests
|
||||||
|
|
2
test/inventory/test_incorrect_range
Normal file
2
test/inventory/test_incorrect_range
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[test]
|
||||||
|
host[1:2:3:4]
|
Loading…
Reference in a new issue