Skip to content

Commit

Permalink
test with updated order
Browse files Browse the repository at this point in the history
  • Loading branch information
ekdeveloper committed Sep 13, 2024
1 parent d25ba5d commit 945a724
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
options: --privileged

env:
FHIR_CONTAINER_NAME: "node-fhir-server-mongo-fhir-1"
FHIR_CONTAINER_NAME: 'node-fhir-server-mongo-fhir-1'

steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Test metadata curl request
run: |
# Perform the GET request and store the HTTP status code
# Perform the GET request for basic metadata
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET -H "Content-Type: application/json" "http://${CONTAINER_IP}:3000/4_0_0/metadata")
# Check if the HTTP status code is 200
Expand All @@ -57,12 +57,9 @@ jobs:
exit 1
fi
- name: Test curl request
run: sh ./scripts/curlRequests/patient_get_test.sh $CONTAINER_IP

- name: Test new patient curl request
run: |
# Perform the GET request and store the HTTP status code
# Perform the PUT request to add a new patient
response=$(curl -s -o /dev/null -w "%{http_code}" -X PUT -H "Content-Type: application/json" -T scripts/curlRequests/example_patient.json "http://${CONTAINER_IP}:3000/4_0_0/Patient/example")
# Check if the HTTP status code is 200
Expand All @@ -73,9 +70,12 @@ jobs:
exit 1
fi
- name: Test get patient curl request
run: sh ./scripts/curlRequests/patient_get_test.sh "${CONTAINER_IP}"

- name: Test get patient curl request
run: |
# Perform the GET request and store the HTTP status code
# Perform the GET request to get the patient
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET -H "Content-Type: application/json" "http://${CONTAINER_IP}:3000/4_0_0/Patient/example")
# Check if the HTTP status code is 200
Expand All @@ -88,7 +88,7 @@ jobs:
- name: Test get non-existing patient curl request
run: |
# Perform the GET request and store the HTTP status code
# Perform the GET request to get a non existing patient
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET -H "Content-Type: application/json" "http://${CONTAINER_IP}:3000/4_0_0/Patient/ghost")
# Check if the HTTP status code is NOT 200
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ services:
image: mongo:7.0.14
ports:
- '27017'
# volumes:
# - mongo_data:/data/db
volumes:
mongo_data:
26 changes: 6 additions & 20 deletions scripts/curlRequests/example_patient.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,16 @@
{
"use": "official",
"family": "Chalmers",
"given": [
"Peter",
"James"
]
"given": ["Peter", "James"]
},
{
"use": "usual",
"given": [
"Jim"
]
"given": ["Jim"]
},
{
"use": "maiden",
"family": "Windsor",
"given": [
"Peter",
"James"
],
"given": ["Peter", "James"],
"period": {
"end": "2002"
}
Expand Down Expand Up @@ -95,9 +87,7 @@
"use": "home",
"type": "both",
"text": "534 Erewhon St PeasantVille, Rainbow, Vic 3999",
"line": [
"534 Erewhon St"
],
"line": ["534 Erewhon St"],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
Expand Down Expand Up @@ -129,9 +119,7 @@
}
]
},
"given": [
"Bénédicte"
]
"given": ["Bénédicte"]
},
"telecom": [
{
Expand All @@ -142,9 +130,7 @@
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"line": ["534 Erewhon St"],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
Expand Down

0 comments on commit 945a724

Please sign in to comment.