Skip to content

Commit

Permalink
updated tests for organs and dataset-types
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanSimmons committed Sep 13, 2024
1 parent 6f56d6b commit b329d14
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/test_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,21 @@ echo
echo | tee -a test.out
echo | tee -a test.out

echo "3. /dataset-types?application_context=HUBMAP => valid; should return 200" | tee -a test.out
echo "3. /dataset-types?application_context=HUBMAP&isepic=mango => invalid parameter; should return custom 400" | tee -a test.out
curl --request GET \
--url "${UBKG_URL}/dataset-types?application_context=HUBMAP&isepic=mango" \
--header "Accept: application/json" | cut -c1-60 | tee -a test.out
echo
echo "4. /dataset-types?application_context=HUBMAP => valid; should return 200" | tee -a test.out
curl --request GET \
--url "${UBKG_URL}/dataset-types?application_context=HUBMAP" \
--header "Accept: application/json" | cut -c1-60 | tee -a test.out
echo
echo "5. /dataset-types?application_context=HUBMAP&isepic=false => valid; should return 200" | tee -a test.out
curl --request GET \
--url "${UBKG_URL}/dataset-types?application_context=HUBMAP&isepic=true" \
--header "Accept: application/json" | tee -a test.out


# dataset-types/<id> uses the same code as dataset-types
echo "TESTS FOR: dataset-types/<id> GET" | tee -a test.out
Expand Down
10 changes: 10 additions & 0 deletions test/test_gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ curl --request GET \
--header "Accept: application/json" |cut -c1-60
echo

echo "dataset-types GET"
curl --request GET \
--url "${UBKG_URL}/dataset-types?application_context=HUBMAP" \
--header "Accept: application/json" |cut -c1-60

echo "dataset-types/<name> GET"
curl --request GET \
--url "${UBKG_URL}/dataset-types/Auto-fluorescence?application_context=HUBMAP" \
--header "Accept: application/json" |cut -c1-60

echo "organs GET for HUBMAP"
curl --request GET \
--url "${UBKG_URL}/organs?application_context=HUBMAP" \
Expand Down

0 comments on commit b329d14

Please sign in to comment.