Fixes related to uncommenting test_dir_inventory in TestInventory.

0. Uncomment the test.
1. Test fails.
2. Make vars unique per file in test inventory files.
3. Modify token addition to not ast.literal_eval(v) a variable containing a hash.
4. Modify vars to have an escape in test inventory file.
5. Catch exceptions explicitly. Any unknown exceptions should be a bug.
6. Test passes.
This commit is contained in:
Richard C Isaacson 2014-03-06 12:09:53 -06:00
parent 616d7e53b1
commit 16fe09eef8
5 changed files with 33 additions and 21 deletions

View file

@ -1,3 +1,3 @@
zeus var_a=2
zeus var_a=0
morpheus
thor

View file

@ -1,5 +1,5 @@
[major-god]
zeus var_a=1
zeus var_a=2
thor
[minor-god]

View file

@ -1,5 +1,5 @@
[major-god] # group with inline comments
zeus var_a="1#2" # host with inline comments and "#" in the var string
zeus var_a="3\#4" # host with inline comments and "#" in the var string
# A comment
thor