mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-11 11:21:05 +00:00
* add inventory plugin unit test `test_verify_file`
* fix typos in `test_verify_file_bad_config` unit test
(cherry picked from commit f44300cec5)
Co-authored-by: Rémy Keil <remy.keil@gmail.com>
This commit is contained in:
@@ -66,6 +66,12 @@ def test_get_stack_slugs(inventory):
|
||||
]
|
||||
|
||||
|
||||
def test_verify_file(tmp_path, inventory):
|
||||
file = tmp_path / "foobar.stackpath_compute.yml"
|
||||
file.touch()
|
||||
assert inventory.verify_file(str(file)) is True
|
||||
|
||||
|
||||
def test_verify_file_bad_config(inventory):
|
||||
assert inventory.verify_file('foobar.stackpath_compute.yml') is False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user