Skip to content

Commit d64b0d2

Browse files
committed
Debug changes
1 parent 9b3ebd8 commit d64b0d2

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@ echo "$uninstall_status" | grep -q "$STATUS_SEE_OTHER"
5454
echo "DEBUG: Verifying owl:imports was removed..." >&2
5555
ns_after=$(curl -k -s -H "Accept: application/n-triples" "${END_USER_BASE_URL}ns")
5656
echo "DEBUG: Namespace after uninstall:" >&2
57-
echo "$ns_after" | grep "owl#imports" >&2 || echo "DEBUG: No owl:imports found" >&2
57+
if echo "$ns_after" | grep "owl#imports" >&2; then
58+
echo "DEBUG: Found owl:imports in namespace" >&2
59+
else
60+
echo "DEBUG: No owl:imports found" >&2
61+
fi
5862
if echo "$ns_after" | grep -q "<${namespace_ontology_uri}> <http://www.w3.org/2002/07/owl#imports> <${package_ontology_uri}>"; then
5963
echo "ERROR: Package ontology import still present after uninstall!" >&2
60-
exit 1
64+
false
6165
fi
6266
echo "DEBUG: owl:imports triple was removed" >&2
6367

@@ -66,7 +70,7 @@ echo "DEBUG: Verifying package ontology document was deleted..." >&2
6670
deleted_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
6771
"${ADMIN_BASE_URL}ontologies/${package_ontology_hash}/")
6872
echo "DEBUG: Deleted ontology document status: $deleted_status" >&2
69-
if ! echo "$deleted_status" | grep -q "$STATUS_FORBIDDEN"; then
73+
echo "$deleted_status" | grep -q "$STATUS_FORBIDDEN" || {
7074
echo "ERROR: Expected 403 but got $deleted_status" >&2
71-
exit 1
72-
fi
75+
false
76+
}

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ backend_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
6262
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
6363
echo "DEBUG: Backend status: $backend_status" >&2
6464

65-
if ! echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND"; then
65+
# Check if stylesheet was deleted (should return 404)
66+
echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND" || {
6667
echo "ERROR: Expected 404 but got $deleted_status from Varnish" >&2
6768
echo "ERROR: Backend returned $backend_status" >&2
68-
exit 1
69-
fi
69+
false # Use false instead of exit 1 to ensure it fails with set -e
70+
}
7071

7172
# verify master stylesheet no longer includes package
7273
echo "DEBUG: Verifying master stylesheet no longer includes package..." >&2
@@ -79,6 +80,6 @@ else
7980
fi
8081
if echo "$master_xsl" | grep -q "com/linkeddatahub/packages/skos/layout.xsl"; then
8182
echo "ERROR: Master stylesheet still includes package after uninstall!" >&2
82-
exit 1
83+
false
8384
fi
8485
echo "DEBUG: Master stylesheet verification passed" >&2

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,24 @@ backend_status=$(curl -k -w "%{http_code}\n" -o /dev/null -s \
5555
"${END_USER_BASE_URL}static/com/linkeddatahub/packages/skos/layout.xsl")
5656
echo "DEBUG: Backend status: $backend_status" >&2
5757

58-
if ! echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND"; then
58+
# Check if stylesheet was deleted (should return 404)
59+
echo "$deleted_status" | grep -q "$STATUS_NOT_FOUND" || {
5960
echo "ERROR: Expected 404 but got $deleted_status from Varnish" >&2
6061
echo "ERROR: Backend returned $backend_status" >&2
61-
exit 1
62-
fi
62+
false # Use false instead of exit 1 to ensure it fails with set -e
63+
}
6364

6465
# verify master stylesheet was regenerated without package import
6566
echo "DEBUG: Verifying master stylesheet no longer includes package..." >&2
6667
master_xsl=$(curl -k -s "$END_USER_BASE_URL"static/xsl/layout.xsl)
6768
echo "DEBUG: Master stylesheet content (checking for package):" >&2
68-
echo "$master_xsl" | grep "com/linkeddatahub/packages" >&2 || echo "DEBUG: No package imports found" >&2
69+
if echo "$master_xsl" | grep "com/linkeddatahub/packages" >&2; then
70+
echo "DEBUG: Found package imports in master stylesheet" >&2
71+
else
72+
echo "DEBUG: No package imports found" >&2
73+
fi
6974
if echo "$master_xsl" | grep -q "com/linkeddatahub/packages/skos/layout.xsl"; then
7075
echo "ERROR: Master stylesheet still includes package after uninstall!" >&2
71-
exit 1
76+
false
7277
fi
7378
echo "DEBUG: Master stylesheet verification passed" >&2

0 commit comments

Comments
 (0)