From 2ad0446284955b5f1c5a9b7d884a991978915455 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:45:50 -0700 Subject: [PATCH] Add `simulated-sender` (#1460) * 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 --- .github/workflows/automated-staging-test-submit.yml | 2 +- scripts/hurl/rs/hrl | 2 +- scripts/hurl/rs/readme.md | 2 +- scripts/hurl/rs/waters.hurl | 2 +- scripts/rs/load-etor-org-settings.sh | 7 +------ scripts/rs/setup-local-vault.sh | 2 -- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/automated-staging-test-submit.yml b/.github/workflows/automated-staging-test-submit.yml index c86f1db77..20f367c39 100644 --- a/.github/workflows/automated-staging-test-submit.yml +++ b/.github/workflows/automated-staging-test-submit.yml @@ -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) diff --git a/scripts/hurl/rs/hrl b/scripts/hurl/rs/hrl index 121526896..6383a4103 100755 --- a/scripts/hurl/rs/hrl +++ b/scripts/hurl/rs/hrl @@ -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="" diff --git a/scripts/hurl/rs/readme.md b/scripts/hurl/rs/readme.md index d73e46e77..98d39c9c9 100644 --- a/scripts/hurl/rs/readme.md +++ b/scripts/hurl/rs/readme.md @@ -11,7 +11,7 @@ Options: -t 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 The client id to use (Default: flexion) - -s The client sender to use (Default: simulated-hospital) + -s The client sender to use (Default: simulated-sender) -x The path to the client private key for the environment -i The submissionId to call the history API with (Required for history API) -v Verbose mode diff --git a/scripts/hurl/rs/waters.hurl b/scripts/hurl/rs/waters.hurl index ff42ad1fd..e212141a1 100644 --- a/scripts/hurl/rs/waters.hurl +++ b/scripts/hurl/rs/waters.hurl @@ -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}} diff --git a/scripts/rs/load-etor-org-settings.sh b/scripts/rs/load-etor-org-settings.sh index e30b795c6..9eae5d39e 100755 --- a/scripts/rs/load-etor-org-settings.sh +++ b/scripts/rs/load-etor-org-settings.sh @@ -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 diff --git a/scripts/rs/setup-local-vault.sh b/scripts/rs/setup-local-vault.sh index 3bbdb4ae2..953f66a0a 100755 --- a/scripts/rs/setup-local-vault.sh +++ b/scripts/rs/setup-local-vault.sh @@ -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