Skip to content

Commit

Permalink
fix: adjust several keywords with access_token containing tnt value
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavploaia committed Feb 22, 2024
1 parent 25dcf5a commit 6f2776f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions tests/robot/_resources/keywords/composition_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -930,16 +930,20 @@ get versioned composition by uid

# Note: uses REST.GET
get versioned composition of EHR by UID
[Arguments] ${uid}
[Arguments] ${uid} ${multitenancy_token}=${None}
[Documentation] Gets versioned composition with given uid.
... DEPENDENCY: `prepare new request session` and keywords that
... create and expose an `ehr_id` e.g.
... - `create new EHR`
... - `generate random ehr_id`
... and creation of composition, giving its ID as argument
&{headers} Create Dictionary Accept=application/json
IF '${multitenancy_token}' != '${None}'
Set To Dictionary ${headers} Authorization=Bearer ${multitenancy_token}
END

&{resp}= REST.GET ${baseurl}/ehr/${ehr_id}/versioned_composition/${uid}
... headers={"Accept": "application/json"}
... headers=${headers}
Set Test Variable ${response} ${resp}


Expand Down
4 changes: 2 additions & 2 deletions tests/robot/_resources/keywords/directory_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ get DIRECTORY (JSON)
... **without** URI parameter (which are optional)!
... check the API here:
... https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-get-1
[Arguments] ${multitenancy_token}=${None}
Set Test Variable ${KEYWORD NAME} GET DIRECTORY (JSON)

GET /ehr/ehr_id/directory JSON
GET /ehr/ehr_id/directory JSON multitenancy_token=${multitenancy_token}


get DIRECTORY at time (JSON)
Expand Down
8 changes: 6 additions & 2 deletions tests/robot/_resources/keywords/ehr_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,13 @@ get ehr_status of EHR
... create and expose an `ehr_id` e.g.
... - `create new EHR`
... - `generate random ehr_id`
[Arguments] ${multitenancy_token}=${None}
&{headers} Create Dictionary Accept=application/json
IF '${multitenancy_token}' != '${None}'
Set To Dictionary ${headers} Authorization=Bearer ${multitenancy_token}
END
&{resp}= REST.GET ${baseurl}/ehr/${ehr_id}/ehr_status
... headers={"Content-Type": "application/json"}
... headers=${headers}
# ... headers={"If-Match": null}
Set Test Variable ${response} ${resp}

Expand Down

0 comments on commit 6f2776f

Please sign in to comment.