From 7bb8f80782362ea241affbbd9ce0f45b4639db8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Konrad=20Ba=C5=84ka?= Date: Mon, 7 Jun 2021 23:22:35 +0200 Subject: [PATCH] [vFW_CNF_CDS] Improve logging and fix tests typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Issue-ID: INT-1899 Signed-off-by: Konrad Bańka Change-Id: I6f5fb411d395a83e3cc47ab1c089ffaa6bc64da5 --- .../templates/cba/Scripts/kotlin/K8sHealthCheck.kt | 16 ++++++++++++++-- .../templates/helm/vfw/templates/tests/ping.yaml | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/K8sHealthCheck.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/K8sHealthCheck.kt index 6c45b4e9..68d83e03 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/K8sHealthCheck.kt +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/K8sHealthCheck.kt @@ -95,8 +95,20 @@ open class K8sHealthCheck : AbstractScriptComponentFunction() { } jobs.joinAll() } - log.info("Get statuses finished:") - log.info("$statuses") + var success = true + statuses?.forEach { it -> + if (it.value != "Succeeded") { + success = false + } + } + log.info("---") + if (success) { + log.info("Healthcheck finished successfully") + } else { + log.info("Healthcheck finished with failure") + } + log.info("Detailed results: $statuses") + log.info("---") return statuses } diff --git a/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml b/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml index 37b41832..70c40c7d 100644 --- a/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml +++ b/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml @@ -29,7 +29,7 @@ spec: "name": {{ .Values.int_private1_net_id | quote }}, "interface": "eth1" , "defaultGateway": "false" - } + }, { "name": {{ .Values.int_private2_net_id | quote }}, "interface": "eth2" , -- 2.16.6