From 835fdd1ec26a62efffebe19fea3baa490bfd8341 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 23 Aug 2013 12:42:26 +0200 Subject: [PATCH] add test for missing end in host range --- test/TestInventory.py | 5 +++++ test/inventory/test_missing_end | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 test/inventory/test_missing_end diff --git a/test/TestInventory.py b/test/TestInventory.py index 7e442716dd..1fddfc73cd 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -274,6 +274,11 @@ class TestInventory(unittest.TestCase): def test_invalid_range(self): Inventory(os.path.join(self.test_dir, 'inventory','test_incorrect_range')) + @raises(errors.AnsibleError) + def test_missing_end(self): + Inventory(os.path.join(self.test_dir, 'inventory','test_missing_end')) + + ################################################### ### Inventory API tests diff --git a/test/inventory/test_missing_end b/test/inventory/test_missing_end new file mode 100644 index 0000000000..ff32042402 --- /dev/null +++ b/test/inventory/test_missing_end @@ -0,0 +1,2 @@ +[test] +host[1:]