Skip to content

Commit

Permalink
add a test to verify ansible detect invalid range
Browse files Browse the repository at this point in the history
  • Loading branch information
mscherer committed Aug 23, 2013
1 parent 7fec9c3 commit 2aea8a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/TestInventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ def test_complex_intersect(self):
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
Expand Down
2 changes: 2 additions & 0 deletions test/inventory/test_incorrect_range
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[test]
host[1:2:3:4]

0 comments on commit 2aea8a6

Please sign in to comment.