Skip to content

Commit

Permalink
Merge pull request #1680 from samply/release/v0.26.1
Browse files Browse the repository at this point in the history
Release v0.26.1
  • Loading branch information
alexanderkiel authored Apr 28, 2024
2 parents b01d6da + 7176dc8 commit b495f79
Show file tree
Hide file tree
Showing 59 changed files with 1,903 additions and 19,267 deletions.
16 changes: 16 additions & 0 deletions .github/scripts/check-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,46 @@ fi
BASE="https://blaze.localhost/fhir"

echo "checking index.html using the Accept header..."
STATUS_CODE=$(curl -sL --cacert "$CA_CERT_BLAZE" -H 'Accept: text/html' -o /dev/null -w '%{response_code}' "$BASE")
HEADERS=$(curl -sL --cacert "$CA_CERT_BLAZE" -H 'Accept: text/html' -o /dev/null -D - "$BASE")
CONTENT_TYPE_HEADER=$(echo "$HEADERS" | grep -iv 'X-Content-Type-Options' | grep -i 'Content-Type' | tr -d '\r' | cut -d' ' -f2)

test "status code" "$STATUS_CODE" "200"
test "Content-Type header" "$CONTENT_TYPE_HEADER" "text/html"

echo "checking index.html using the _format query param..."
STATUS_CODE=$(curl -sL --cacert "$CA_CERT_BLAZE" -o /dev/null -w '%{response_code}' "$BASE?_format=html")
HEADERS=$(curl -sL --cacert "$CA_CERT_BLAZE" -o /dev/null -D - "$BASE?_format=html")
CONTENT_TYPE_HEADER=$(echo "$HEADERS" | grep -iv 'X-Content-Type-Options' | grep -i 'Content-Type' | tr -d '\r' | cut -d' ' -f2)

test "status code" "$STATUS_CODE" "200"
test "Content-Type header" "$CONTENT_TYPE_HEADER" "text/html"

echo "checking version.json..."
STATUS_CODE=$(curl -sL --cacert "$CA_CERT_BLAZE" -H 'Accept: text/html' -o /dev/null -w '%{response_code}' "$BASE/_app/version.json")
HEADERS=$(curl -sL --cacert "$CA_CERT_BLAZE" -H 'Accept: text/html' -o /dev/null -D - "$BASE/_app/version.json")
CONTENT_TYPE_HEADER=$(echo "$HEADERS" | grep -iv 'X-Content-Type-Options' | grep -i 'Content-Type' | tr -d '\r' | cut -d' ' -f2)

test "status code" "$STATUS_CODE" "200"
test "Content-Type header" "$CONTENT_TYPE_HEADER" "application/json"

echo "checking system-search using access token..."
RESOURCE_TYPE=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" "$BASE" | jq -r .resourceType)

test "Resource type" "$RESOURCE_TYPE" "Bundle"

echo "checking system-search JSON using the _format query param..."
STATUS_CODE=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" -o /dev/null -w '%{response_code}' "$BASE?_format=json")
HEADERS=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" -o /dev/null -D - "$BASE?_format=json")
CONTENT_TYPE_HEADER=$(echo "$HEADERS" | grep -iv 'X-Content-Type-Options' | grep -i 'Content-Type' | tr -d '\r' | cut -d' ' -f2)

test "status code" "$STATUS_CODE" "200"
test "Content-Type header" "$CONTENT_TYPE_HEADER" "application/fhir+json;charset=utf-8"

echo "checking system-search XML using the _format query param..."
STATUS_CODE=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" -o /dev/null -w '%{response_code}' "$BASE?_format=xml")
HEADERS=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" -o /dev/null -D - "$BASE?_format=xml")
CONTENT_TYPE_HEADER=$(echo "$HEADERS" | grep -iv 'X-Content-Type-Options' | grep -i 'Content-Type' | tr -d '\r' | cut -d' ' -f2)

test "status code" "$STATUS_CODE" "200"
test "Content-Type header" "$CONTENT_TYPE_HEADER" "application/fhir+xml;charset=utf-8"
8 changes: 0 additions & 8 deletions .github/scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,3 @@ create() {
update() {
curl -XPUT -s -H 'Accept: application/fhir+json' -H "Content-Type: application/fhir+json" -d @- -o /dev/null "$1"
}

create() {
curl -s -H 'Accept: application/fhir+json' -H "Content-Type: application/fhir+json" -d @- "$1"
}

update() {
curl -XPUT -s -H 'Accept: application/fhir+json' -H "Content-Type: application/fhir+json" -d @- -o /dev/null "$1"
}
Loading

0 comments on commit b495f79

Please sign in to comment.