aboutsummaryrefslogtreecommitdiffstats
path: root/infra-healthcheck/infra_healthcheck
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2021-01-07 11:00:09 +0100
committermrichomme <morgan.richomme@orange.com>2021-01-07 11:37:56 +0100
commit682b993848db69e54eb01a8745eb2cb98ed40ceb (patch)
treed9511965af7d3618ab24f1724c27a6c5d6c0820c /infra-healthcheck/infra_healthcheck
parent94e27de8ea2db18be2878faf38f5d74a09acfdf7 (diff)
[SECURITY] Include cert check of the internal ports
A test dealing with the verification of the ports exposed as nodeports is already integrated. The goal of the patch is to compelte with a test dealing with all the internal ports retrieved from k8s on the ONAP namespace. Unlike nodeport_check_certs, this test must be executed from inside the cluster. As a consequence a dependency is added in testcases.yaml - TEST_ENVIRONMENT: 'internal_job' In order to avoir triggerring the test when executing all the infra tests of this xtesting dockers. A kubernetes job consuming the image shall be created in xtesting-onap to execute the test. Issue-ID: INT-1818 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I16bb55fb784bd67f8a2b59f9f895fb754da8e3d0
Diffstat (limited to 'infra-healthcheck/infra_healthcheck')
-rw-r--r--infra-healthcheck/infra_healthcheck/k8stest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/infra-healthcheck/infra_healthcheck/k8stest.py b/infra-healthcheck/infra_healthcheck/k8stest.py
index e1c4213..1d69fac 100644
--- a/infra-healthcheck/infra_healthcheck/k8stest.py
+++ b/infra-healthcheck/infra_healthcheck/k8stest.py
@@ -108,3 +108,13 @@ class OnapSecurityNodePortsCerts(K8sTesting):
'--mode','nodeport','--namespace','onap','--dir',
'/var/lib/xtesting/results/nodeport_check_certs']
self.criteria_string = ">>> Test Check certificates PASS"
+
+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')
+ self.cmd = ['python3', 'check_certificates_validity.py',
+ '--mode','internal','--namespace','onap','--dir',
+ '/var/lib/xtesting/results/internal_check_certs']
+ self.criteria_string = ">>> Test Check certificates PASS"