From a537bdc760e550c5c62c545bdf142d39c6504d40 Mon Sep 17 00:00:00 2001 From: Michal Jagiello Date: Mon, 24 Apr 2023 07:35:16 +0000 Subject: [Secrity] Add missing templates files into package After migration to use pyproject.toml I forget to add templates into package. There is also change needed to use new package name on jinja env loading Issue-ID: TEST-394 Signed-off-by: Michal Jagiello Change-Id: Ia9f2a26f00f83f92a9a6d01f25e663bddf1fa098 --- test/security/check_versions/pyproject.toml | 3 +++ test/security/check_versions/versions/reporting.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/security/check_versions/pyproject.toml b/test/security/check_versions/pyproject.toml index a9b5c540e..2c235c7b8 100644 --- a/test/security/check_versions/pyproject.toml +++ b/test/security/check_versions/pyproject.toml @@ -19,3 +19,6 @@ build-backend = "setuptools.build_meta" [project.entry-points."xtesting.testcase"] versions = "versions.k8s_bin_versions_inspector_test_case:Inspector" + +[tool.setuptools.package-data] +versions = ["templates/*.j2"] diff --git a/test/security/check_versions/versions/reporting.py b/test/security/check_versions/versions/reporting.py index 43ef26db8..9053600c2 100644 --- a/test/security/check_versions/versions/reporting.py +++ b/test/security/check_versions/versions/reporting.py @@ -244,7 +244,7 @@ class OnapVersionsReporting: # Create reporting page jinja_env = Environment( autoescape=select_autoescape(["html"]), - loader=PackageLoader("onap_check_versions"), + loader=PackageLoader("versions"), ) page_info = { "title": "ONAP Integration versions reporting", -- cgit 1.2.3-korg