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

Commit 94e0940

Browse files
committed
ci.ocp: Improve the service-up detection
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. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
1 parent f15be37 commit 94e0940

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.ci/openshift-ci/run_smoke_test.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,19 @@ else
5757
fi
5858

5959
info "Wait for the HTTP server to respond"
60-
rm -f hello_msg.txt
61-
waitForProcess 60 1 "curl '${host}:${port}${hello_file}' -s -o hello_msg.txt"
62-
63-
grep "${hello_msg}" hello_msg.txt > /dev/null
64-
test_status=$?
65-
if [ $test_status -eq 0 ]; then
60+
if waitForProcess 60 1 "curl '${host}:${port}${hello_file}' | grep '$hello_msg'"; then
61+
test_status=0
6662
info "HTTP server is working"
6763
else
64+
test_status=1
65+
echo "::error:: HTTP server not working"
66+
curl -vvv '${host}:${port}${hello_file}'
67+
echo "::group::Describe kube-system namespace"
68+
oc describe -n kube-system all
69+
echo "::endgroup::"
70+
echo "::group::Descibe current namespace"
71+
oc describe all
72+
echo "::endgroup::"
6873
info "HTTP server is unreachable"
6974
fi
7075

0 commit comments

Comments
 (0)