From 0eef3fc4a240a1992852420fea606d15b1e95239 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Sat, 21 Feb 2026 13:29:24 +0100 Subject: [PATCH] Fix healthcheck failure due to hard coded path to certificates - k8test.py contained hard coded reference to python3.8 even though image uses python3.11 (for the past two years) Issue-ID: INT-2355 Change-Id: I61ffe82f479359fa3f435fbcd40b88fb89ee66f5 Signed-off-by: Fiete Ostkamp --- infra-healthcheck/docker/Dockerfile | 4 +++- infra-healthcheck/infra_healthcheck/k8stest.py | 5 +++-- infra-healthcheck/requirements.txt | 2 -- infra-healthcheck/upper-constraints.txt | 2 -- testkube-executor/constraints.txt | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 infra-healthcheck/upper-constraints.txt diff --git a/infra-healthcheck/docker/Dockerfile b/infra-healthcheck/docker/Dockerfile index 311edf7..103f71a 100644 --- a/infra-healthcheck/docker/Dockerfile +++ b/infra-healthcheck/docker/Dockerfile @@ -31,7 +31,9 @@ RUN set -x && \ rm -rf /usr/local/lib/python3.11/site-packages/PyYAML* && \ pip3 install --upgrade pip && \ pip3 install --ignore-installed --no-cache-dir \ - -r requirements.txt -c upper-constraints.txt \ + git+https://gitlab.com/Orange-OpenSource/lfn/tools/helm-onap-status.git#egg=helm_onap_status \ + git+https://gitlab.com/Orange-OpenSource/lfn/tools/chart-status.git#egg=chart_status \ + -r requirements.txt \ -e . \ git+https://git.onap.org/testsuite/pythonsdk-tests.git@$ONAP_TESTS_TAG \ git+https://git.onap.org/integration.git@$ONAP_TAG#subdirectory=test/security/check_certificates && \ diff --git a/infra-healthcheck/infra_healthcheck/k8stest.py b/infra-healthcheck/infra_healthcheck/k8stest.py index 1d69fac..ec25ca4 100644 --- a/infra-healthcheck/infra_healthcheck/k8stest.py +++ b/infra-healthcheck/infra_healthcheck/k8stest.py @@ -19,6 +19,7 @@ import subprocess import os import time +import check_certificates from xtesting.core import testcase class K8sTesting(testcase.TestCase): @@ -103,7 +104,7 @@ class OnapSecurityNodePortsCerts(K8sTesting): """Check the cerfificates for the nodeports.""" def __init__(self, **kwargs): super(OnapSecurityNodePortsCerts, self).__init__(**kwargs) - os.chdir('/usr/lib/python3.8/site-packages/check_certificates') + os.chdir(os.path.dirname(check_certificates.__file__)) self.cmd = ['python3', 'check_certificates_validity.py', '--mode','nodeport','--namespace','onap','--dir', '/var/lib/xtesting/results/nodeport_check_certs'] @@ -113,7 +114,7 @@ class OnapSecurityInternalPortsCerts(K8sTesting): """Check the cerfificates for the internal ports.""" def __init__(self, **kwargs): super(OnapSecurityInternalPortsCerts, self).__init__(**kwargs) - os.chdir('/usr/lib/python3.8/site-packages/check_certificates') + os.chdir(os.path.dirname(check_certificates.__file__)) self.cmd = ['python3', 'check_certificates_validity.py', '--mode','internal','--namespace','onap','--dir', '/var/lib/xtesting/results/internal_check_certs'] diff --git a/infra-healthcheck/requirements.txt b/infra-healthcheck/requirements.txt index 58171bc..031ddf4 100644 --- a/infra-healthcheck/requirements.txt +++ b/infra-healthcheck/requirements.txt @@ -11,5 +11,3 @@ bashate # Apache-2.0 xtesting kubernetes # Apache-2.0 colorama # BSD -helm_onap_status -chart_status \ No newline at end of file diff --git a/infra-healthcheck/upper-constraints.txt b/infra-healthcheck/upper-constraints.txt deleted file mode 100644 index 20fdc2e..0000000 --- a/infra-healthcheck/upper-constraints.txt +++ /dev/null @@ -1,2 +0,0 @@ -git+https://gitlab.com/Orange-OpenSource/lfn/tools/helm-onap-status.git#egg=helm_onap_status -git+https://gitlab.com/Orange-OpenSource/lfn/tools/chart-status.git#egg=chart_status diff --git a/testkube-executor/constraints.txt b/testkube-executor/constraints.txt index 9c0369f..2ff463e 100644 --- a/testkube-executor/constraints.txt +++ b/testkube-executor/constraints.txt @@ -96,7 +96,7 @@ robotframework-ftplibrary===1.9 robotframework-httplibrary===0.4.2 robotframework-jsonlibrary===0.5 robotframework-pythonlibcore===4.4.1 -robotframework-requests===0.9.3 +robotframework-requests===0.9.6 robotframework-seleniumlibrary===6.7.1 robotframework-sshlibrary===3.8.0 rpds-py===0.20.1 @@ -125,4 +125,4 @@ WebTest===3.0.1 wsproto===1.2.0 xtesting===0.98.0 yamllint===1.35.1 -zipp===3.20.2 \ No newline at end of file +zipp===3.20.2 -- 2.16.6