From be226256d85836a8a213f54f5b56c4da570d6473 Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Thu, 9 Feb 2023 14:46:18 +0000 Subject: Fix test failures in K8s CSIT Apex-pdp - Add json response files, update sim hostnames Api,Pap - Update context paths for prometheus metrics Print console logs of test execution Issue-ID: POLICY-4546 Signed-off-by: zrrmmua Change-Id: I1bed6e4077c7e52b986bcb927204819ec0d95d99 --- csit/run-k8s-csit.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'csit') diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh index 33cf2f8a..e348ca80 100755 --- a/csit/run-k8s-csit.sh +++ b/csit/run-k8s-csit.sh @@ -94,10 +94,19 @@ function build_robot_image () { echo "---------------------------------------------" echo "Installing Robot framework pod for running CSIT" microk8s helm install csit-robot robot --set robot=$ROBOT_FILE --set "readiness={${READINESS_CONTAINERS[*]}}"; - echo "Please check the logs of policy-csit-robot pod for the test execution results" + print_robot_log fi } +function print_robot_log () { + robotpod=$(microk8s kubectl get po | grep policy-csit) + podName=$(echo $robotpod | awk '{print $1}') + echo "The robot tests will begin once the policy components {${READINESS_CONTAINERS[*]}} are up and running..." + microk8s kubectl wait --for=condition=ready --timeout=180s pod/$podName + microk8s kubectl logs -f $podName + echo "Please check the logs of policy-csit-robot pod for the test execution results" +} + function clone_models () { GIT_TOP=$(git rev-parse --show-toplevel) GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \ -- cgit