Skip to content

Commit

Permalink
fix: check if system_id_with_tenant var exists then replace it in com…
Browse files Browse the repository at this point in the history
…po file
  • Loading branch information
vladislavploaia committed Oct 9, 2024
1 parent c805a6c commit 52d37c3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
18 changes: 16 additions & 2 deletions tests/robot/_resources/keywords/aql_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,22 @@ Commit Composition For AQL
&{params} Create Dictionary
... format=FLAT ehrId=${ehr_id} templateId=${template_id}
END
${file} Get Binary File ${COMPOSITIONS_DATA_SETS}/${composition_file}
IF '${format}' == 'FLAT'
##
${is_var_exists} Run Keyword And Return Status
... Variable Should Exist ${system_id_with_tenant}
${temp_file_content} Get File ${COMPOSITIONS_DATA_SETS}/${composition_file}
${is_var_present_in_file} Run Keyword And Return Status
... Should Contain ${temp_file_content} \${system_id_with_tenant}
IF '${is_var_exists}' == '${TRUE}' and '${is_var_present_in_file}' == '${TRUE}'
${replaced_file_str} Replace String ${temp_file_content}
... \${system_id_with_tenant} ${system_id_with_tenant}
${file} Set Variable ${replaced_file_str}
ELSE
${file_tmp} Get Binary File ${COMPOSITIONS_DATA_SETS}/${composition_file}
${file} Set Variable ${file_tmp}
END
##
IF '${format}' == 'FLAT'
${resp} POST On Session ${SUT} composition
... params=${params} expected_status=anything
... data=${file} headers=${headers}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@
],
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "9b9725a1-347a-40dd-8c68-e78938ec0f19::local.ehrbase.org::1"
"value": "9b9725a1-347a-40dd-8c68-e78938ec0f19::${system_id_with_tenant}::1"
},
"archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@
],
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "b037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"
"value": "b037bf7c-0ecb-40fb-aada-fc7d559815ea::${system_id_with_tenant}::1"
},
"archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@
],
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "c037bf7c-0ecb-40fb-aada-fc7d559815ea::local.ehrbase.org::1"
"value": "c037bf7c-0ecb-40fb-aada-fc7d559815ea::${system_id_with_tenant}::1"
},
"archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
],
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "a9ac5dd6-6cd6-4adb-9eb5-586930ae13e9::local.ehrbase.org::1"
"value": "a9ac5dd6-6cd6-4adb-9eb5-586930ae13e9::${system_id_with_tenant}::1"
},
"archetype_node_id": "openEHR-EHR-COMPOSITION.conformance_composition_.v0"
}

0 comments on commit 52d37c3

Please sign in to comment.