[VERSIONS] Use external python package to manage versions test 64/121564/2
authormorganrol <morgan.richomme@orange.com>
Thu, 27 May 2021 07:46:24 +0000 (09:46 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Thu, 27 May 2021 13:46:21 +0000 (13:46 +0000)
the check_versons code has been repackaged in an external
gitlab.com repo [1]

It provides
- better error management
- reporting

[1]: https://gitlab.com/Orange-OpenSource/lfn/onap/
     integration/onap-version-status

Issue-ID: TEST-340

Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I6d892e8c5e6c1729a1073e9d6f538b636390515f

security/docker/Dockerfile
security/onap_security/security_tests.py
security/setup.cfg

index 40b5e60..b6b35d2 100644 (file)
@@ -62,7 +62,8 @@ RUN set -x && \
     pip3 install --no-cache-dir \
         git+https://git.onap.org/integration/xtesting.git@$ONAP_TESTS_TAG#subdirectory=security && \
     cd /kube-hunter && pip3 install -r /kube-hunter/requirements.txt && \
-    pip3 install -r /check_versions/requirements.txt && \
+    pip3 install --no-cache-dir \
+        git+https://gitlab.com/Orange-OpenSource/lfn/onap/integration/onap-version-status.git && \
     apk del .build-deps
 
 COPY docker/testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
index cdfafcd..cb4b2fd 100644 (file)
@@ -154,11 +154,3 @@ class OnapSecurityKubeHunter(SecurityTesting):
                     kube_hunter_cmd.append(j.address)
         self.cmd = kube_hunter_cmd
         self.error_string = "Vulnerabilties detected."
-
-
-class OnapSecurityVersions(SecurityTesting):
-    """Check that Java and Python are available only in versions recommended by SECCOM."""
-    def __init__(self, **kwargs):
-        super(OnapSecurityVersions, self).__init__(**kwargs)
-        self.cmd = ['/check_versions.sh', 'onap', '-r', '/check_versions/recommended_versions.yaml']
-        self.error_string = "Not recommended versions found"
index 6e07ada..61fe7fa 100644 (file)
@@ -14,4 +14,3 @@ xtesting.testcase =
     nonssl_endpoints = onap_security.security_tests:OnapSecurityNonSSLPorts
     jdpw_ports = onap_security.security_tests:OnapSecurityJdwpPorts
     kube_hunter = onap_security.security_tests:OnapSecurityKubeHunter
-    versions = onap_security.security_tests:OnapSecurityVersions