Commit Graph

7 Commits (0cf5666778a3e33ac3abd1c9b99e5097d324c715)

Author SHA1 Message Date
Brian Coca df5d595984
Don't fail for mixed typed keys (#73726) (#73776)
but warn that content cound not be sorted because of this

* added tests

(cherry picked from commit 527bff6b79)
4 years ago
Abhijeet Kasurde 9a86f8c10e
[2.10][InventoryManager] Fix two unhandled exceptions (#73798)
Change:
- Fix regression: unhandled exception when given inventory directory
  is empty or contains empty subdirectories.
- Fix unhandled exception when limit file is actually a directory
  instead of a file.
- Fix inventory tests which previously could never fail due to missing
  `set -e`. Fixed up tests that failed after `set -e` was added. Added
  several tests.

Test Plan:
- New tests
- Fixed existing tests which previously could never fail

Tickets:
- Fixes #73658

Signed-off-by: Rick Elrod <rick@elrod.me>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit fa046d302c)

Co-authored-by: Rick Elrod <rick@elrod.me>
4 years ago
Brian Coca 9478b59da5
fix inventory source parse error handling (#73160) (#73276)
fixes #51025

added test cases

(cherry picked from commit 1e27d4052a)
4 years ago
Abhijeet Kasurde 41e19a4058
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides
non-existing limit file.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde 2ebc4e1e7e inventory: Handle IndexError while parsing limit file (#59776)
Handle IndexError exception raised while parsing the limit file.

Fixes: #59695

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Brian Coca a7b14ec1be
Fix strat inv (#58982)
* Fix strategy functions that update inventory

* added tests
5 years ago
Matt Martz cdb53ff1a4
Restore behavior for detecting only localhost, and no limit match. Fixes #52152 (#52172)
* Restore behavior for detecting only localhost, and no limit match. Fixes #52152

* Add test for non-matching limit
6 years ago