Skip to content

Commit

Permalink
fix: add access_token arg to commit CONTRIBUTION (JSON)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavploaia committed Feb 22, 2024
1 parent 002249f commit 33fc32d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/robot/_resources/keywords/contribution_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ TOC | Table Of Contents
*** Keywords ***
# 1) High Level Keywords
commit CONTRIBUTION (JSON)
[Arguments] ${valid_test_data_set}
[Arguments] ${valid_test_data_set} ${multitenancy_token}=${None}
Set Test Variable ${KEYWORD NAME} COMMIT CONTRIBUTION 1 (JSON)
load valid test-data-set ${valid_test_data_set}
POST /ehr/ehr_id/contribution JSON
POST /ehr/ehr_id/contribution JSON ${multitenancy_token}
Set Test Variable ${body} ${response.json()}
Set Test Variable ${contribution_uid} ${body['uid']['value']}
Set Test Variable ${versions} ${body['versions']}
Expand Down Expand Up @@ -262,7 +262,7 @@ check response: is positive with list of ${x} contribution(s)
# POST

POST /ehr/ehr_id/contribution
[Arguments] ${format}
[Arguments] ${format} ${multitenancy_token}=${None}
[Documentation] DEPENDENCY any keyword that exposes a `${test_data}` variable
... to test level scope e.g. `load valid test-data-set`
Expand All @@ -274,6 +274,10 @@ POST /ehr/ehr_id/contribution
Run Keyword If $format=='XML' prepare new request session
... XML Prefer=return=representation

IF '${multitenancy_token}' != '${None}'
Set To Dictionary ${headers} Authorization=Bearer ${multitenancy_token}
END

${resp}= POST On Session ${SUT} /ehr/${ehr_id}/contribution expected_status=anything
... json=${test_data}
... headers=${headers}
Expand Down

0 comments on commit 33fc32d

Please sign in to comment.