Skip to content

Commit

Permalink
update health to healthz endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Aug 19, 2024
1 parent b3d7cde commit 999d4b3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions server/src/test/resources/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,23 @@ fi
echo "get-block.sh executed successfully."

# 5. Call the endpoints /health/liveness and /health/readiness
LIVENESS_URL="http://localhost:8080/health/liveness"
READINESS_URL="http://localhost:8080/health/readiness"
SERVER_URL="http://localhost:8080"
LIVENESS_URL="/healthz/liveness"
READINESS_URL="/healthz/readiness"

if ! curl -f $LIVENESS_URL; then
echo "/health/liveness endpoint failed."
if ! curl -f $SERVER_URL$LIVENESS_URL; then
echo "$LIVENESS_URL failed."
shutdown
exit 1
fi
echo "/health/liveness endpoint is healthy."
echo "$LIVENESS_URL endpoint is healthy."

if ! curl -f $READINESS_URL; then
echo "/health/readiness endpoint failed."
if ! curl -f $SERVER_URL$READINESS_URL; then
echo "$READINESS_URL endpoint failed."
shutdown
exit 1
fi
echo "/health/readiness endpoint is ready."
echo "$READINESS_URL endpoint is ready."z

# 6. Shut everything down
shutdown
Expand Down

0 comments on commit 999d4b3

Please sign in to comment.