Change the criticality of kube-hunter test 13/3313/2
authorJuha Kosonen <juha.kosonen@nokia.com>
Wed, 1 Apr 2020 07:28:30 +0000 (10:28 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Fri, 3 Apr 2020 06:32:27 +0000 (09:32 +0300)
Vulnerabilities discovered by kube-hunter does not impact to overall
result of test suite execution.

Change-Id: If3593412e68f397258de0fe7dcf86f102ae4d0ce
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
bluval/bluval.py
tests/k8s/kube-hunter/kube-hunter.resource

index c79c830..63b301f 100644 (file)
@@ -64,7 +64,7 @@ def run_testcase(testcase):
 
     # run the test
     args = ["robot", "-V", str(variables_updated_file), "-d", str(results_path),
-            "-b", "debug.log", str(test_path)]
+            "-n", "non-critical", "-b", "debug.log", str(test_path)]
 
     print('Executing testcase {}'.format(name))
     print('show_stopper {}'.format(show_stopper))
index 4611e75..6651ddc 100644 (file)
@@ -89,7 +89,9 @@ Delete Scan Job
     Should Be Equal As Integers  ${result.rc}  0
 
 Should Discover No Vulnerabilities
-    Should Be True    ${STATUS}
+    Return From Keyword If  ${STATUS}
+    Fail                    Vulnerabilities discovered
+    ...                     non-critical
 
 Run Scan Within Pod
     ${result}=        Run Process  kubectl  apply  -f  ${CURDIR}/job.yaml