From a2c0f24a424d52e03f78b7a6135a010208a75e87 Mon Sep 17 00:00:00 2001 From: vladislavploaia Date: Thu, 10 Oct 2024 12:04:13 +0300 Subject: [PATCH] fix: use system_id_with_tenant to send its value dynamically to expected test data and AQL expr --- ..._latest_version_contains_composition_data_values.robot | 2 ++ ..._latest_version_contains_observation_data_values.robot | 2 ++ ...on_latest_version_contains_composition_data_values.csv | 2 +- ...on_latest_version_contains_observation_data_values.csv | 2 +- .../version/expected_version_ehr_status_system_id.json | 4 ++-- .../version/expected_version_observation_system_id.json | 8 ++++---- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_composition_data_values.robot b/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_composition_data_values.robot index 94695437..1bef47eb 100644 --- a/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_composition_data_values.robot +++ b/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_composition_data_values.robot @@ -26,6 +26,8 @@ Precondition Upload OPT For AQL conformance_ehrbase.de.v0.opt ### Create EHR For AQL + ${tenant_id} Evaluate '${system_id_with_tenant}'.split('.')[0:1] + Set Suite Variable ${tenant_id_from_system_id} ${tenant_id}[0]. Set Suite Variable ${ehr_id1} ${ehr_id} Commit Contribution For AQL minimal_persistent/minimal_persistent.contribution.json Set Suite Variable ${compo_uid_1} ${versions[0]['id']['value']} diff --git a/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_observation_data_values.robot b/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_observation_data_values.robot index 2d3627fc..006ce482 100644 --- a/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_observation_data_values.robot +++ b/tests/robot/AQL_TESTS/VERSION/version_latest_version_contains_observation_data_values.robot @@ -26,6 +26,8 @@ Precondition Upload OPT For AQL conformance_ehrbase.de.v0.opt ### Create EHR For AQL + ${tenant_id} Evaluate '${system_id_with_tenant}'.split('.')[0:1] + Set Suite Variable ${tenant_id_from_system_id} ${tenant_id}[0]. Set Suite Variable ${ehr_id1} ${ehr_id} Commit Contribution For AQL minimal_persistent/minimal_persistent.contribution.json Set Suite Variable ${compo_uid_1} ${versions[0]['id']['value']} diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_composition_data_values.csv b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_composition_data_values.csv index 5571ca9c..49671dd4 100644 --- a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_composition_data_values.csv +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_composition_data_values.csv @@ -1,6 +1,6 @@ ${query_nr},${path},${where},${order_by},${expected_file},${nr_of_results} 1.,cv/uid/value,"WHERE cv/uid/value = '${compo_uid_2_v3}'",ORDER BY cv/uid/value,expected_version_composition_uid_value.json,1 -2.,cv/commit_audit/system_id,"WHERE cv/commit_audit/system_id > 'local.'",${EMPTY},expected_version_composition_system_id.json,4 +2.,cv/commit_audit/system_id,"WHERE cv/commit_audit/system_id > '${tenant_id_from_system_id}'",${EMPTY},expected_version_composition_system_id.json,4 3.,cv/commit_audit/change_type,${EMPTY},${EMPTY},expected_version_composition_change_type.json,4 4.,cv/commit_audit/change_type/value,"WHERE cv/commit_audit/change_type/value = 'creation'",ORDER BY cv/commit_audit/change_type/value,expected_version_composition_change_type_value.json,1 5.,cv/commit_audit/change_type/defining_code/code_string,"WHERE cv/commit_audit/change_type/defining_code/code_string = '251'",ORDER BY cv/commit_audit/change_type/defining_code/code_string DESC,expected_version_composition_code_string.json,3 diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_observation_data_values.csv b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_observation_data_values.csv index 495f2206..a166fcbc 100644 --- a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_observation_data_values.csv +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/combinations/version_latest_version_contains_observation_data_values.csv @@ -1,6 +1,6 @@ ${query_nr},${path},${where},${order_by},${expected_file},${nr_of_results} 1.,cv/uid/value,"WHERE cv/uid/value = '${compo_uid_7_v2}'",ORDER BY cv/uid/value,expected_version_observation_uid_value.json,1 -2.,cv/commit_audit/system_id,"WHERE cv/commit_audit/system_id > 'local.'",${EMPTY},expected_version_observation_system_id.json,4 +2.,cv/commit_audit/system_id,"WHERE cv/commit_audit/system_id > '${tenant_id_from_system_id}'",${EMPTY},expected_version_observation_system_id.json,4 3.,cv/commit_audit/change_type,"WHERE cv/commit_audit/change_type/value = 'creation'",${EMPTY},expected_version_observation_change_type.json,1 4.,cv/commit_audit/change_type/value,"WHERE cv/commit_audit/change_type/value = 'creation'",ORDER BY cv/commit_audit/change_type/value DESC,expected_version_observation_change_type_value.json,1 5.,cv/commit_audit/change_type/defining_code/code_string,"WHERE cv/commit_audit/change_type/defining_code/code_string = '249'",ORDER BY cv/commit_audit/change_type/defining_code/code_string ASC,expected_version_observation_code_string.json,1 diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_ehr_status_system_id.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_ehr_status_system_id.json index ce2e0780..530a4e35 100644 --- a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_ehr_status_system_id.json +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_ehr_status_system_id.json @@ -15,10 +15,10 @@ ], "rows": [ [ - "local.ehrbase.org" + "${system_id_with_tenant}" ], [ - "local.ehrbase.org" + "${system_id_with_tenant}" ] ] } \ No newline at end of file diff --git a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_observation_system_id.json b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_observation_system_id.json index 6a19e97f..f48544db 100644 --- a/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_observation_system_id.json +++ b/tests/robot/_resources/test_data_sets/aql/fields_and_results/version/expected_version_observation_system_id.json @@ -15,16 +15,16 @@ ], "rows": [ [ - "local.ehrbase.org" + "${system_id_with_tenant}" ], [ - "local.ehrbase.org" + "${system_id_with_tenant}" ], [ - "local.ehrbase.org" + "${system_id_with_tenant}" ], [ - "local.ehrbase.org" + "${system_id_with_tenant}" ] ] } \ No newline at end of file