From c73dd9d2d0187d93409318f5ec4aea082f0c9684 Mon Sep 17 00:00:00 2001 From: mrichomme Date: Mon, 22 Jun 2020 11:49:46 +0200 Subject: Resync manually xtesting repo from gitlab.com repo The goal is to use xtesting once we shall be able to build all the dockers properly Issue-ID: INT-1366 Signed-off-by: mrichomme Change-Id: I068eb6019f6eec04b46b545222cbb5cecb265234 Signed-off-by: mrichomme --- infra-healthcheck/infra_healthcheck/k8stest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'infra-healthcheck/infra_healthcheck') diff --git a/infra-healthcheck/infra_healthcheck/k8stest.py b/infra-healthcheck/infra_healthcheck/k8stest.py index f8d618f..da1d764 100644 --- a/infra-healthcheck/infra_healthcheck/k8stest.py +++ b/infra-healthcheck/infra_healthcheck/k8stest.py @@ -57,10 +57,13 @@ class K8sTesting(testcase.TestCase): details = {} lines = output.split('\n') success = False + str_remarks = "" for log in lines: if log.startswith(">>>"): remarks.append(log.replace('>', '')) + else: + remarks.append(log) for remark in remarks: if ':' in remark: # 2 possible Results @@ -78,6 +81,8 @@ class K8sTesting(testcase.TestCase): # if 1 pod/helm chart if Failed, the testcase is failed if int(details[self.criteria_string]) < 1: success = True + elif("failed" not in str_remarks.join(remarks).lower()): + success = True self.details = details self.__logger.info("details: %s", details) @@ -119,4 +124,4 @@ class OnapSecurityNodePortsIngress(K8sTesting): super(OnapSecurityNodePortsIngress, self).__init__(**kwargs) self.cmd = ['python3', '/check_for_ingress_and_nodeports.py', '--conf', '/root/.kube/config'] - self.error_string = "NodePort without corresponding Ingress found" + self.criteria_string = "NodePort without corresponding Ingress found" -- cgit 1.2.3-korg