Testing whether folder works #26

Merged
kovagoadi merged 52 commits from add-route-to-staging-dev into main 2025-12-25 20:43:32 +01:00
Showing only changes of commit 92e8d5f251 - Show all commits

View File

@@ -1,37 +0,0 @@
#!/bin/bash
set -e
# Configuration
DOMAIN=${DOMAIN:-dev.kovagoadi.hu}
# Configuration
DOMAIN=${DOMAIN:-dev.kovagoadi.hu}
PORT=${PORT:-898}
# We target localhost directly to test the local instance, bypassing public DNS
TARGET_URL="http://127.0.0.1:${PORT}"
HOST_HEADER="test-whoami.${DOMAIN}"
echo "Running regression tests against ${TARGET_URL} with Host: ${HOST_HEADER}..."
# Test 1: Check if whoami service is reachable and returns 200 OK
echo "Test 1: Checking connectivity to whoami service..."
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Host: ${HOST_HEADER}" "${TARGET_URL}")
if [ "$HTTP_CODE" -eq 200 ]; then
echo " [PASS] Service returned 200 OK"
else
echo " [FAIL] Service returned $HTTP_CODE (Expected 200)"
exit 1
fi
# Test 2: Check for specific content (whoami usually returns "Hostname: ...")
echo "Test 2: Checking content..."
CONTENT=$(curl -s -H "Host: ${HOST_HEADER}" "${TARGET_URL}")
if echo "$CONTENT" | grep -q "Hostname:"; then
echo " [PASS] Content contains 'Hostname:'"
else
echo " [FAIL] Content does not look like whoami output"
echo " Output: $CONTENT"
exit 1
fi
echo "All regression tests passed!"