1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-02 16:32:56 +00:00

add inventory plugin unit test test_verify_file (#2773)

* add inventory plugin unit test `test_verify_file`

* fix typos in `test_verify_file_bad_config` unit test
This commit is contained in:
Rémy Keil 2021-06-10 22:05:04 +02:00 committed by GitHub
parent 1e968bce27
commit f44300cec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 2 deletions

View file

@ -74,5 +74,11 @@ def test_conig_query_options(inventory):
assert tags == ['web-server']
def test_verify_file(tmp_path, inventory):
file = tmp_path / "foobar.linode.yml"
file.touch()
assert inventory.verify_file(str(file)) is True
def test_verify_file_bad_config(inventory):
assert inventory.verify_file('foobar.linde.yml') is False
assert inventory.verify_file('foobar.linode.yml') is False