Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
ci.ocp: Improve the service-up detection
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ldoktor committed Feb 21, 2024
1 parent f15be37 commit a10a1e2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .ci/openshift-ci/run_smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a10a1e2

Please sign in to comment.