Commit graph

9 commits

Author SHA1 Message Date
Sam Doran
987265a6ef
Account for empty strings when splitting the host pattern ()
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
2019-09-20 16:03:51 -04:00
Matt Clay
3033fd96b0
Move unit test compat code out of lib/ansible/. ()
* Move ansible.compat.tests to test/units/compat/.
* Fix unit test references to ansible.compat.tests.
* Move builtins compat to separate file.
* Fix classification of test/units/compat/ dir.
2018-10-12 20:01:14 -07:00
Izuke
e02c72d856 Fixes Fixes reconcile inventory to correctly remove hosts from ungrouped 2018-03-20 15:37:39 -04:00
Pierre-Louis Bonicoli
737920cd89 YAML inventory unit test: add tests
Relates: 
2017-12-20 16:59:53 -05:00
Pierre-Louis Bonicoli
35a4fe8546 YAML inventory unit test: add tests 2017-12-20 16:59:53 -05:00
Pierre-Louis Bonicoli
8dff0b091e Fix YAML inventory unit test 2017-12-20 16:59:53 -05:00
John R Barker
cfb15b0272 Revert "YAML inventory unit test: fix test inventory format ()" ()
This reverts commit dfb2f346d8.

https://github.com/ansible/ansible/pull/33828
2017-12-13 14:19:19 -05:00
Pilou
dfb2f346d8 YAML inventory unit test: fix test inventory format ()
* Fix YAML inventory unit test

* YAML inventory unit test: add checks

* YAML: add hosts without any group to ungrouped
2017-12-13 15:30:59 +00:00
Hervé Beraud
db70eeb913 Feature/test inventory ()
* [test] move inventory test to right path
* [feat] add unit test for yaml inventory plugin
2017-10-02 23:01:25 -07:00
Renamed from test/units/inventory/test_inventory.py (Browse further)