Skip to content

Commit

Permalink
In func test setup, ignore cert problems with Server
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh committed Jun 12, 2023
1 parent 13d7095 commit fe90ad1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jenkins/run-server-func-tests
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export PB_SERVER_CONTAINER_NAME=${PB_SERVER_CONTAINER_NAME:-"${PB_POD_NAME}-pben
SERVER_URL="https://localhost:8443"
SERVER_API_ENDPOINTS="${SERVER_URL}/api/v1/endpoints"

# For now, ignore certificate problems when connecting to the Pbench Server
CURL_PB_SERVER="--insecure"

cleanup_flag=0
keep_flag=0
exit_status=0
Expand Down Expand Up @@ -103,7 +106,7 @@ fi
end_in_epoch_secs=$(( $(date +"%s") + 600 ))

echo "Waiting for the Pbench Server's reverse proxy to show up..."
until curl -s -o /dev/null ${SERVER_API_ENDPOINTS}; do
until curl ${CURL_PB_SERVER} -s -o /dev/null ${SERVER_API_ENDPOINTS}; do
if [[ $(date +"%s") -ge ${end_in_epoch_secs} ]]; then
echo "Timed out waiting for the reverse proxy to show up!" >&2
exit_status=1
Expand All @@ -116,15 +119,15 @@ done
echo "Waiting for the Pbench Server to show up..."
status_code=503
while [[ "${status_code}" == "502" || "${status_code}" == "503" ]]; do
status_code=$(curl -s -o /dev/null -w "%{http_code}" ${SERVER_API_ENDPOINTS})
status_code=$(curl ${CURL_PB_SERVER} -s -o /dev/null -w "%{http_code}" ${SERVER_API_ENDPOINTS})
if [[ $(date +"%s") -ge ${end_in_epoch_secs} ]]; then
echo "Timed out waiting for the Pbench Server to show up!" >&2
break
fi
sleep 1
done
if [[ "${status_code}" != "200" ]]; then
curl ${SERVER_API_ENDPOINTS}
curl ${CURL_PB_SERVER} ${SERVER_API_ENDPOINTS}
exit_status=2
else
if (( ${keep_flag} )); then
Expand Down

0 comments on commit fe90ad1

Please sign in to comment.