From ea37027f49c7485d22976c2c705e5372fdf2018f Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 21 Jun 2026 06:02:37 +0200 Subject: [PATCH] fix(test): use ROLE_FILE_VARS_MAIN constant instead of hard-coded vars path test_file_spot flags hard-coded role-file paths; import the SPOT constant from utils.roles.mapping and build the path from it. Co-Authored-By: Claude Opus 4.8 --- tests/lint/ansible/roles/test_no_leaky_proxy_role_vars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lint/ansible/roles/test_no_leaky_proxy_role_vars.py b/tests/lint/ansible/roles/test_no_leaky_proxy_role_vars.py index e37d1979ff..101ab78fd3 100644 --- a/tests/lint/ansible/roles/test_no_leaky_proxy_role_vars.py +++ b/tests/lint/ansible/roles/test_no_leaky_proxy_role_vars.py @@ -28,6 +28,7 @@ from typing import TYPE_CHECKING from utils.annotations.message import in_github_actions, warning from utils.cache.files import read_text +from utils.roles.mapping import ROLE_FILE_VARS_MAIN from . import PROJECT_ROOT @@ -63,7 +64,7 @@ def _collect_findings(root: Path) -> list[LeakyVarFinding]: for role_dir in sorted(roles_dir.iterdir()): if not role_dir.is_dir(): continue - vars_path = role_dir / "vars" / "main.yml" + vars_path = role_dir / ROLE_FILE_VARS_MAIN if not vars_path.is_file(): continue try: