Skip to content

Commit

Permalink
#374 - Extend API to save and load cohort and dataselection
Browse files Browse the repository at this point in the history
- fix wrong method in test for retrieving query slots
- revert verbosity in github action integration test
  • Loading branch information
michael-82 committed Feb 27, 2025
1 parent 214b86d commit 64cb17f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/post-test-query.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

access_token="$(curl -vvv --request POST \
access_token="$(curl -s --request POST \
--url http://localhost:8083/auth/realms/dataportal/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
Expand All @@ -9,7 +9,7 @@ access_token="$(curl -vvv --request POST \
--data password=testpassword \
--data scope=openid | jq '.access_token' | tr -d '"')"

response=$(curl -vvv -i \
response=$(curl -s -i \
--url http://localhost:8091/api/v5/query/feasibility \
--header "Authorization: Bearer $access_token" \
--header 'Content-Type: application/json' \
Expand Down Expand Up @@ -50,7 +50,7 @@ response=$(curl -vvv -i \

result_location=$(echo "$response" | grep -i location | awk '{print $2}')
sleep 5
nr_of_pats=$(curl -vvv \
nr_of_pats=$(curl -v \
--url "${result_location%?}/summary-result" \
--header "Authorization: Bearer $access_token" | jq '.totalNumberOfPatients')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public void testDeleteDataquery_failsWith404OnNotFound() throws Exception {
public void testGetDataquerySlots_succeeds() throws Exception {
doReturn(createSavedQuerySlots()).when(dataqueryHandler).getDataquerySlotsJson(any(String.class));

mockMvc.perform(delete(URI.create(PATH_API + PATH_QUERY + PATH_DATA + "/query-slots")).with(csrf()))
mockMvc.perform(get(URI.create(PATH_API + PATH_QUERY + PATH_DATA + "/query-slots")).with(csrf()))
.andExpect(status().isOk())
.andExpect(jsonPath("$.used").exists())
.andExpect(jsonPath("$.total").exists());
Expand Down

0 comments on commit 64cb17f

Please sign in to comment.