Skip to content

Commit f32cd85

Browse files
committed
Debug output
1 parent 3ae5d36 commit f32cd85

2 files changed

Lines changed: 30 additions & 4 deletions

File tree

http-tests/admin/packages/install-uninstall-package-stylesheet.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,22 @@ echo "$uninstall_status" | grep -q "$STATUS_SEE_OTHER"
4949
echo "DEBUG: Verifying package stylesheet was deleted..." >&2
5050
deleted_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
5151
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
52-
echo "DEBUG: Deleted stylesheet status: $deleted_status" >&2
52+
echo "DEBUG: Deleted stylesheet status (via Varnish): $deleted_status" >&2
53+
54+
# Check if it's cached by looking at headers
55+
echo "DEBUG: Checking Varnish cache headers..." >&2
56+
curl -k -s -I "${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl" | grep -i "x-varnish\|age\|x-cache" >&2 || echo "DEBUG: No Varnish headers found" >&2
57+
58+
# Try bypassing Varnish by hitting backend directly
59+
echo "DEBUG: Checking backend directly (bypassing Varnish)..." >&2
60+
backend_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
61+
-H "X-Forwarded-For: 127.0.0.1" \
62+
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
63+
echo "DEBUG: Backend status: $backend_status" >&2
64+
5365
if ! echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND"; then
54-
echo "ERROR: Expected 404 but got $deleted_status" >&2
66+
echo "ERROR: Expected 404 but got $deleted_status from Varnish" >&2
67+
echo "ERROR: Backend returned $backend_status" >&2
5568
exit 1
5669
fi
5770

http-tests/admin/packages/uninstall-package-stylesheet.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,22 @@ echo "$uninstall_status" | grep -q "$STATUS_SEE_OTHER"
4242
echo "DEBUG: Verifying package stylesheet was deleted..." >&2
4343
deleted_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
4444
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
45-
echo "DEBUG: Deleted stylesheet status: $deleted_status" >&2
45+
echo "DEBUG: Deleted stylesheet status (via Varnish): $deleted_status" >&2
46+
47+
# Check if it's cached by looking at headers
48+
echo "DEBUG: Checking Varnish cache headers..." >&2
49+
curl -k -s -I "${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl" | grep -i "x-varnish\|age\|x-cache" >&2 || echo "DEBUG: No Varnish headers found" >&2
50+
51+
# Try bypassing Varnish by hitting backend directly
52+
echo "DEBUG: Checking backend directly (bypassing Varnish)..." >&2
53+
backend_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
54+
-H "X-Forwarded-For: 127.0.0.1" \
55+
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
56+
echo "DEBUG: Backend status: $backend_status" >&2
57+
4658
if ! echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND"; then
47-
echo "ERROR: Expected 404 but got $deleted_status" >&2
59+
echo "ERROR: Expected 404 but got $deleted_status from Varnish" >&2
60+
echo "ERROR: Backend returned $backend_status" >&2
4861
exit 1
4962
fi
5063

0 commit comments

Comments
 (0)