From a10a1e2c9cbc21afc1e80f22b0fb8634d27cbd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Wed, 7 Feb 2024 12:12:06 +0100 Subject: [PATCH] ci.ocp: Improve the service-up detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit waiting for the first response is not sufficient as OCP returns html page without error even when the route is not yet established describing the issue (why it doesn't reply with 500?). Waiting for the correct output should do better. Fixes: #5808 Signed-off-by: Lukáš Doktor --- .ci/openshift-ci/run_smoke_test.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.ci/openshift-ci/run_smoke_test.sh b/.ci/openshift-ci/run_smoke_test.sh index df205eb0a..329c3df80 100755 --- a/.ci/openshift-ci/run_smoke_test.sh +++ b/.ci/openshift-ci/run_smoke_test.sh @@ -57,14 +57,12 @@ else fi info "Wait for the HTTP server to respond" -rm -f hello_msg.txt -waitForProcess 60 1 "curl '${host}:${port}${hello_file}' -s -o hello_msg.txt" - -grep "${hello_msg}" hello_msg.txt > /dev/null -test_status=$? -if [ $test_status -eq 0 ]; then +check_cmd="curl -vvv '${host}:${port}${hello_file}' 2>&1 | grep -q '$hello_msg'" +if waitForProcess 60 1 "${check_cmd}"; then + test_status=0 info "HTTP server is working" else + test_status=1 info "HTTP server is unreachable" fi