RUN set -x && \
apk --no-cache add --update curl ca-certificates && \
apk --no-cache add --virtual .build-deps --update \
- gcc python3-dev musl-dev && \
+ gcc python3-dev musl-dev openssl-dev libffi-dev && \
chmod +x /usr/local/bin/kubectl && \
adduser kubectl -Du 2342 -h /config && \
wget https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm && \
pip3 install --no-cache-dir -r upper-constraints.txt && \
pip3 install --no-cache-dir \
git+https://gitlab.com/Orange-OpenSource/lfn/onap/integration/xtesting.git@$ONAP_TESTS_TAG#subdirectory=infra-healthcheck && \
+ pip3 install --no-cache-dir \
+ git+https://git.onap.org/integration.git@$ONAP_TESTS_TAG#subdirectory=test/security/check_certificates && \
apk del .build-deps
COPY docker/testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
class OnapHelmTest(K8sTesting):
"""Kubernetes conformance test suite"""
def __init__(self, **kwargs):
- if "case_name" not in kwargs:
- kwargs.get("case_name", 'onap-helm')
super(OnapHelmTest, self).__init__(**kwargs)
self.cmd = ['/check_onap_helm.sh']
self.criteria_string = "Nb Failed Helm Charts"
class OnapSecurityNodePortsIngress(K8sTesting):
"""Check that there is no NodePort without corresponding Ingress port."""
def __init__(self, **kwargs):
- if "case_name" not in kwargs:
- kwargs.get("case_name", 'nodeport_ingress')
super(OnapSecurityNodePortsIngress, self).__init__(**kwargs)
self.cmd = ['python3', '/check_for_ingress_and_nodeports.py',
'--conf', '/root/.kube/config']
self.criteria_string = "NodePort without corresponding Ingress found"
+
+class OnapSecurityNodePortsCerts(K8sTesting):
+ """Check the cerfificates fot he nodeports."""
+ def __init__(self, **kwargs):
+ super(OnapSecurityNodePortsCerts, self).__init__(**kwargs)
+ os.chdir('/usr/lib/python3.8/site-packages/check_certificates')
+ self.cmd = ['python3', 'check_certificates_validity.py',
+ '--mode','nodeport','--namespace','onap','--dir',
+ '/var/lib/xtesting/results/nodeport_check_certs']
+ self.criteria_string = ">>> Test Check certificates PASS"