Skip to content

Commit

Permalink
Add simulated-sender (#1460)
Browse files Browse the repository at this point in the history
* Replaced simulated-hospital and simulated-lab senders for simulated-sender for local and automates tests

* Removed sender and receiver setup for AL from RS scripts
  • Loading branch information
basiliskus authored Oct 18, 2024
1 parent dc61126 commit 2ad0446
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automated-staging-test-submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
host=https://staging.prime.cdc.gov:443
client_id=flexion
client_sender=automated-staging-test-sender
client_sender=simulated-sender
jwt=$(jwt encode --exp='+5min' --jti $(uuidgen) --alg RS256 \
-k $client_id.$client_sender -i $client_id.$client_sender \
-s $client_id.$client_sender -a $host --no-iat -S @/tmp/staging_private_key.pem)
Expand Down
2 changes: 1 addition & 1 deletion scripts/hurl/rs/hrl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env=local
root=$CDCTI_HOME/examples/
content_type=application/hl7-v2
client_id=flexion
client_sender=simulated-hospital
client_sender=simulated-sender
verbose=""
submission_id=""

Expand Down
2 changes: 1 addition & 1 deletion scripts/hurl/rs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Options:
-t <CONTENT_TYPE> The content type for the message (e.g. 'application/hl7-v2' or 'application/fhir+ndjson') (Default: application/hl7-v2)
-e [local | staging | production ] The environment to run the test in (Default: local)
-c <CLIENT_ID> The client id to use (Default: flexion)
-s <CLIENT_SENDER> The client sender to use (Default: simulated-hospital)
-s <CLIENT_SENDER> The client sender to use (Default: simulated-sender)
-x <KEY_PATH> The path to the client private key for the environment
-i <SUBMISSION_ID> The submissionId to call the history API with (Required for history API)
-v Verbose mode
Expand Down
2 changes: 1 addition & 1 deletion scripts/hurl/rs/waters.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ HTTP 200
[Captures]
token: jsonpath "$['access_token']"

# curl --header 'Content-Type: application/hl7-v2' --header 'Client: flexion.simulated-hospital' --header 'Authorization: Bearer $token' --data-binary '@/path/to/message.hl7' 'http://localhost:7071/api/waters'
# curl --header 'Content-Type: application/hl7-v2' --header 'Client: flexion.simulated-sender' --header 'Authorization: Bearer $token' --data-binary '@/path/to/message.hl7' 'http://localhost:7071/api/waters'
POST {{url}}/api/waters
Content-Type: {{content-type}}
Client: {{client-id}}.{{client-sender}}
Expand Down
7 changes: 1 addition & 6 deletions scripts/rs/load-etor-org-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ fi
./prime organization addkey -e $env --public-key $flexion_key --scope "flexion.*.report" --orgName flexion --kid flexion.etor-service-sender --doit
./prime organization addkey -e $env --public-key $flexion_key --scope "flexion.*.report" --orgName flexion --kid flexion.simulated-hospital --doit
./prime organization addkey -e $env --public-key $flexion_key --scope "flexion.*.report" --orgName flexion --kid flexion.simulated-lab --doit

## AL
./prime multiple-settings set -s -e $env -i ./settings/STLTs/AL/al-phl.yml
# ./prime organization addkey -e $env --public-key $al_phl_key --scope "al-phl.*.report" --orgName al-phl --kid al-phl.etor-nbs-results --doit
./prime multiple-settings set -e $env -s -i ./settings/STLTs/Oracle/oracle-rln.yml
# ./prime organization addkey -e $env --public-key $oracle_rln_key --scope "oracle-rln.*.report" --orgName oracle-rln --kid oracle-rln.etor-nbs-orders --doit
./prime organization addkey -e $env --public-key $flexion_key --scope "flexion.*.report" --orgName flexion --kid flexion.simulated-sender --doit

## CA
./prime multiple-settings set -s -e $env -i ./settings/STLTs/CA/ucsd.yml
Expand Down
2 changes: 0 additions & 2 deletions scripts/rs/setup-local-vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ export $(xargs <.vault/env/.env.local)
./prime create-credential --type UserApiKey --apikey-user ucsd --apikey "$private_key" --persist UCSD--ETOR-NBS-RESULTS
./prime create-credential --type UserApiKey --apikey-user la-phl --apikey "$private_key" --persist LA-PHL--ETOR-NBS-ORDERS
./prime create-credential --type UserApiKey --apikey-user la-ochsner --apikey "$private_key" --persist LA-OCHSNER--ETOR-NBS-RESULTS
./prime create-credential --type UserApiKey --apikey-user al-phl --apikey "$private_key" --persist AL-PHL--ETOR-NBS-ORDERS
./prime create-credential --type UserApiKey --apikey-user oracle-rln --apikey "$private_key" --persist ORACLE-RLN--ETOR-NBS-RESULTS

0 comments on commit 2ad0446

Please sign in to comment.