Commit graph

22 commits

Author SHA1 Message Date
Serge van Ginderachter
b92d70c5b6 tests files extensions in group/host_vars dir
only files with extensions as per
C.YAML_FILENAME_EXTENSIONS should be parsed
2015-05-23 21:37:12 +02:00
James Cammarata
4e5eb7559e Merge branch 'svg_and_inventory_refactor' into devel 2014-07-10 14:43:07 -05:00
Dan Slimmon
6ad09f1825 Added test for regex grouping bug fixed in 307a3e 2014-07-10 00:21:38 +00:00
James Cammarata
d8a7b49b59 Merge branch 'inventorytree' of https://github.com/sergevanginderachter/ansible into sergevanginderachter-inventorytree 2014-06-24 15:21:08 -05:00
Kevin Bell
bcfef8d0d4 Add a broken test that shows extensions not skipped 2014-05-14 23:43:14 -07:00
Taylor Barstow
154055e9ff Fixing expectations in test_dir_inventory_groups_for_host 2014-04-17 16:41:49 -04:00
Taylor Barstow
9ed7717634 Adding unit tests for host groups with inventory dir 2014-04-13 13:01:13 -04:00
Serge van Ginderachter
d3eaa1b79e InventoryDir: refactor logic
Make sure all hosts and groups are unique objects
and that those are referenced uniquely everywhere.
Also fixes test_dir_inventory unit tests which were broken after previous
patches.

	modified:   lib/ansible/inventory/dir.py
2014-03-25 12:45:00 +01:00
Oleg Bulatov
f6a4c20cc0 Make parsing variables for hosts and groups more consistent
This commit allows to specify arrays in [group:vars] block.

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
2014-03-16 21:47:26 +04:00
Richard C Isaacson
913c855df4 Formatting cleanup.
Post merging of GH-5837 via GH-5749.
2014-03-06 13:08:35 -06:00
g-k-r
dbad5d71c6 modifed test to use get_hosts instead of get_groups
closes #5749

Conflicts:
	test/units/TestInventory.py
2014-03-06 13:06:08 -06:00
g-k-r
6626cb0b3d add test same host in different files in dir
tests issue #5749
 same host defined in different groups which in turn are defined
 in different ini files in an inventory directory

Conflicts:
	test/units/TestInventory.py
2014-03-06 13:03:25 -06:00
Richard C Isaacson
16fe09eef8 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.
2014-03-06 12:09:53 -06:00
Richard C Isaacson
b41d8106ff Revert "Merge pull request #6287 from risaacson/fix_hash_in_var"
This reverts commit a808287451, reversing
changes made to 6129ea7566.
2014-03-05 14:49:30 -06:00
Richard C Isaacson
22a1fb28d6 Minor cleanup. 2014-03-05 13:44:15 -06:00
g-k-r
a3c36a6853 modifed test to use get_hosts instead of get_groups
closes #5749

Conflicts:
	test/units/TestInventory.py
2014-03-05 13:29:47 -06:00
g-k-r
23fee4b836 add test same host in different files in dir
tests issue #5749
 same host defined in different groups which in turn are defined
 in different ini files in an inventory directory

Conflicts:
	test/units/TestInventory.py
2014-03-05 13:27:39 -06:00
Richard C Isaacson
49bd8b0b35 Fix inventory for test_dir_inventory
It came up that fixing this unit test may relate to another ticket that is open. This work allows us to uncomment this unit test by fixing how we pars variables allowing a quoted variable to contain a '#'.

Work also went into cleaning up some of the test data to clarify what was working.

Lastly work went into cleaning up formatting so that the code is easily read.
2014-03-04 18:31:49 -06:00
Jesse Keating
0c2c37a47a Avoid range selection on empty groups
This prevents a traceback when the group is empty.
Fixes #6258
2014-03-03 13:23:27 -08:00
James Cammarata
f23ccebbdc Merge branch 'issue_4620' of https://github.com/jimi-c/ansible into jimi-c-issue_4620 2014-02-24 20:30:25 -06:00
Michael DeHaan
f0dd040377 reconnect unit tests to 'make tests' 2014-02-20 19:13:27 -05:00
Michael DeHaan
2177b773c8 Rename tests to test, use old directory name. 2014-02-20 19:11:15 -05:00
Renamed from tests/units/TestInventory.py (Browse further)