1
0
Fork 0
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:
Michael Scherer 2013-08-23 12:29:38 +02:00
parent 7fec9c3eba
commit 2aea8a6368
2 changed files with 5 additions and 0 deletions

View file

@ -270,6 +270,9 @@ class TestInventory(unittest.TestCase):
hosts = inventory.list_hosts("nc:&triangle:!tri_c")
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

View file

@ -0,0 +1,2 @@
[test]
host[1:2:3:4]