From 84d379d8ff87e3fbc1f003a2876d30b852338fa6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 13 Feb 2025 18:37:20 +0200 Subject: [PATCH] Add healthcheck test for codegate Signed-off-by: Radoslav Dimitrov --- .github/workflows/integration-tests.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 827e5d7a..a8db7985 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -92,6 +92,23 @@ jobs: # Check mount configuration docker inspect $CODEGATE_CONTAINER_NAME -f '{{ json .Mounts }}' | jq + - name: Test the healthcheck endpoint + timeout-minutes: 4 + run: | + # Check the healthcheck endpoint is available + while true; do + echo "Checking for healthcheck endpoint in CodeGate..." + + if curl --silent --fail --get "http://localhost:8989/health" >/dev/null; then + echo "Healthcheck endpoint is available" + break + else + echo "Healthcheck endpoint not available. Retrying in 5 seconds..." + sleep 5 + fi + done + curl "http://localhost:8989/health" + - name: Ensure certificates are available in the container timeout-minutes: 4 run: |