Skip to content

Commit

Permalink
fix: add test data for AQL on Folder case
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavploaia committed Oct 8, 2024
1 parent 714039c commit 315da73
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,22 @@ ${q} SELECT c/uid/value FROM FOLDER f1[openEHR-EHR-FOLDER.episode_of_care.v1]

*** Test Cases ***
Folder In Folder: ${q}
[Tags] not-ready
Set Test Variable ${query} ${q}
Set AQL And Execute Ad Hoc Query ${query}
${temporary_file} Set Variable ${EXPECTED_JSON_DATA_SETS}/folder/expected_contains_compo_folder_in_folder_tmp.json
Length Should Be ${resp_body['rows']} 1
${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/folder/expected_contains_compo_folder_in_folder.json
${expected_file} Set Variable expected_contains_compo_folder_in_folder.json
${expected_res_tmp} Set Variable ${EXPECTED_JSON_DATA_SETS}/folder/${expected_file}
${file_without_replaced_vars} Get File ${expected_res_tmp}
${data_replaced_vars} Replace Variables ${file_without_replaced_vars}
Create File ${temporary_file}
... ${data_replaced_vars}
${exclude_paths} Create List root['meta'] root['q']
${diff} compare json-string with json-file
... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths}
... ${resp_body_actual} ${temporary_file} exclude_paths=${exclude_paths}
... ignore_string_case=${TRUE}
Should Be Empty ${diff} msg=DIFF DETECTED!
[Teardown] Remove File ${temporary_file}


*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"meta": {
"_type": "RESULTSET",
"_schema_version": "1.0.3",
"_created": "2024-10-08T09:33:02.8728411+03:00",
"_executed_aql": "SELECT c/uid/value FROM FOLDER f1[openEHR-EHR-FOLDER.episode_of_care.v1] CONTAINS FOLDER f2[openEHR-EHR-FOLDER.episode_of_care.v1] CONTAINS COMPOSITION c",
"resultsize": 1
},
"q": "SELECT c/uid/value FROM FOLDER f1[openEHR-EHR-FOLDER.episode_of_care.v1] CONTAINS FOLDER f2[openEHR-EHR-FOLDER.episode_of_care.v1] CONTAINS COMPOSITION c",
"columns": [
{
"path": "c/uid/value",
"name": "#0"
}
],
"rows": [
[
"${c_uid4}::local.ehrbase.org::1"
]
]
}

0 comments on commit 315da73

Please sign in to comment.