@@ -22,7 +22,6 @@ add-property-constraint.sh \
2222 --label " New constraint" \
2323 --property " http://rdfs.org/sioc/ns#content" \
2424 " $ontology_doc "
25- echo " DEBUG: add-property-constraint.sh done"
2625
2726# create a class with the constraint
2827
@@ -35,28 +34,21 @@ add-class.sh \
3534 --constraint " $constraint " \
3635 --sub-class-of " https://www.w3.org/ns/ldt/document-hierarchy#Item" \
3736 " $ontology_doc "
38- echo " DEBUG: add-class.sh done"
3937
4038# clear ontology from memory
4139
42- clear_output= $( clear-ontology.sh \
40+ clear-ontology.sh \
4341 -f " $OWNER_CERT_FILE " \
4442 -p " $OWNER_CERT_PWD " \
4543 -b " $ADMIN_BASE_URL " \
46- --ontology " $namespace " 2>&1 ) && clear_exit=0 || clear_exit=$?
47- echo " DEBUG: clear-ontology.sh exit=$clear_exit output=$clear_output "
48- [ " $clear_exit " -eq 0 ] || exit " $clear_exit "
44+ --ontology " $namespace "
4945
5046# check that the constraint is present in the ontology
5147
52- ns_body= $( curl -k -f -s -N \
48+ curl -k -f -s -N \
5349 -H " Accept: application/n-triples" \
54- " $namespace_doc " 2>&1 ) && ns_exit=0 || ns_exit=$?
55- echo " DEBUG: namespace GET exit=$ns_exit "
56- echo " DEBUG: namespace body (first 500 chars): ${ns_body: 0: 500} "
57- [ " $ns_exit " -eq 0 ] || exit " $ns_exit "
58- echo " $ns_body " | grep " $constraint " > /dev/null
59- echo " DEBUG: constraint found in namespace doc"
50+ " $namespace_doc " \
51+ | grep " $constraint " > /dev/null
6052
6153# check that creating an instance of the class without sioc:content returns 422 Unprocessable Entity due to missing sioc:content
6254
@@ -79,6 +71,5 @@ response=$(echo -e "$turtle" \
7971 " $END_USER_BASE_URL " \
80722>&1 ) # redirect output from stderr to stdout
8173
82- echo " DEBUG: PUT response (last 200 chars): ${response: -200} "
8374echo " $response " \
8475| grep " HTTP/1.1 422" > /dev/null
0 commit comments