File tree Expand file tree Collapse file tree 3 files changed +24
-14
lines changed
http-tests/admin/packages Expand file tree Collapse file tree 3 files changed +24
-14
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,14 @@ echo "$uninstall_status" | grep -q "$STATUS_SEE_OTHER"
5454echo " DEBUG: Verifying owl:imports was removed..." >&2
5555ns_after=$( curl -k -s -H " Accept: application/n-triples" " ${END_USER_BASE_URL} ns" )
5656echo " 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
5862if 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
6165fi
6266echo " DEBUG: owl:imports triple was removed" >&2
6367
@@ -66,7 +70,7 @@ echo "DEBUG: Verifying package ontology document was deleted..." >&2
6670deleted_status=$( curl -k -w " %{http_code}\n" -o /dev/null -s \
6771 " ${ADMIN_BASE_URL} ontologies/${package_ontology_hash} /" )
6872echo " 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+ }
Original file line number Diff line number Diff 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" )
6363echo " 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
7273echo " DEBUG: Verifying master stylesheet no longer includes package..." >&2
7980fi
8081if 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
8384fi
8485echo " DEBUG: Master stylesheet verification passed" >&2
Original file line number Diff line number Diff 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" )
5656echo " 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
6566echo " DEBUG: Verifying master stylesheet no longer includes package..." >&2
6667master_xsl=$( curl -k -s " $END_USER_BASE_URL " static/xsl/layout.xsl)
6768echo " 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
6974if 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
7277fi
7378echo " DEBUG: Master stylesheet verification passed" >&2
You can’t perform that action at this time.
0 commit comments