From ea4f2c58c39d181ce1c3faf86faa6e724b21ed7e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 07:17:02 +0200 Subject: Adding upstream version 24.5.1. Signed-off-by: Daniel Baumann --- test/test_runtime.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/test_runtime.py') diff --git a/test/test_runtime.py b/test/test_runtime.py index 6a110d4..0823f60 100644 --- a/test/test_runtime.py +++ b/test/test_runtime.py @@ -893,3 +893,16 @@ def test_get_galaxy_role_name_invalid() -> None: "role_name": False, # <-- invalid data, should be string } assert _get_galaxy_role_name(galaxy_infos) == "" + + +def test_runtime_has_playbook() -> None: + """Tests has_playbook method.""" + runtime = Runtime(require_module=True) + + assert not runtime.has_playbook("this-does-not-exist.yml") + # call twice to ensure cache is used: + assert not runtime.has_playbook("this-does-not-exist.yml") + + assert not runtime.has_playbook("this-does-not-exist.yml", basedir=Path()) + # this is part of community.molecule collection + assert runtime.has_playbook("community.molecule.validate.yml") -- cgit v1.2.3