aboutsummaryrefslogtreecommitdiffstats
path: root/infra-healthcheck/infra_healthcheck
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2020-06-22 11:49:46 +0200
committermrichomme <morgan.richomme@orange.com>2020-06-22 14:18:06 +0200
commitc73dd9d2d0187d93409318f5ec4aea082f0c9684 (patch)
tree2220e059f70a9d85e1993a900a0aef0fcbf69cac /infra-healthcheck/infra_healthcheck
parent242950666ad42f4e9523b0fc3cd7c6d71b707103 (diff)
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 <morgan.richomme@orange.com> Change-Id: I068eb6019f6eec04b46b545222cbb5cecb265234 Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'infra-healthcheck/infra_healthcheck')
-rw-r--r--infra-healthcheck/infra_healthcheck/k8stest.py7
1 files changed, 6 insertions, 1 deletions
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"