Commit b5a0e32c authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix: pass id and type parameters as a comma-separated list (and not as a list)...

fix: pass id and type parameters as a comma-separated list (and not as a list) when querying entities
parent 934aedc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory
    ${request}    ${response}=    Create Entity Selecting Content Type  ${filename}     ${entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}

    ${attributes_to_be_retrieved}=  Create List      ${attribute_airqualitylevel}  ${attribute_subcategory}
    ${attributes_to_be_retrieved}=  Catenate    SEPARATOR=,     ${attribute_airqualitylevel}    ${attribute_subcategory}
    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    Check Response Status Code  200    ${response['status']}
    Check Response Body Containing Entity element    ${expectation_filename}    ${entity_id}    ${response['body']}
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ Get an entity if an attribute is not known to the system
    ${request}    ${response}=    Create Entity Selecting Content Type  ${filename}     ${entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}

    ${attributes_to_be_retrieved}=  Create List      ${attribute_not_known}
    ${attributes_to_be_retrieved}=  Catenate    SEPARATOR=,     ${attribute_not_known}
    ${response}=    Query Entity    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    attrs=${attributes_to_be_retrieved}
    Check Response Status Code  404    ${response['status']}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ Query several entities based on ids
    @{entities_ids_to_be_compared}=  Create List   ${first_entity_id}    ${second_entity_id}
    ${entities_ids_to_be_retrieved}=  Catenate    SEPARATOR=,   ${first_entity_id}    ${second_entity_id}

    @{entity_types_to_be_retrieved}=  Create List   ${entity_type}
    ${response}=    Query Entities    entity_ids=${entities_ids_to_be_retrieved}    entity_types=@{entity_types_to_be_retrieved} 
    ${entity_types_to_be_retrieved}=  Catenate    SEPARATOR=,     ${entity_type}
    ${response}=    Query Entities    entity_ids=${entities_ids_to_be_retrieved}    entity_types=${entity_types_to_be_retrieved} 
    Check Response Status Code  200    ${response['status']}
    Check Response Body Containing List Containing Entity elements    ${expectation_filename}    ${entities_ids_to_be_compared}    ${response['body']}

+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ Query several entities based on the given id pattern
    ${request}    ${response}=    Create Entity Selecting Content Type  ${filename}     ${second_entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}

    @{entity_types_to_be_retrieved}=  Create List   ${entity_type}
    ${entity_types_to_be_retrieved}=  Catenate    SEPARATOR=,     ${entity_type}
    @{entities_ids_to_be_compared}=  Create List   ${second_entity_id}    ${first_entity_id}
    ${response}=    Query Entities    entity_id_pattern=${entity_id_pattern}    entity_types=${entity_types_to_be_retrieved}
    Check Response Status Code  200    ${response['status']}
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ Query several entities based on attribute names
    Check Response Status Code  201    ${response['status']}

    ${attributes_to_be_retrieved}=  Catenate    SEPARATOR=,   ${attribute_airqualitylevel}  ${attribute_subcategory}
    @{entities_ids_to_be_retrieved}=  Create List   ${first_entity_id}
    ${entities_ids_to_be_retrieved}=  Catenate    SEPARATOR=,     ${first_entity_id}
    ${response}=    Query Entities    attrs=${attributes_to_be_retrieved}
    Check Response Status Code  200    ${response['status']}
    Check Response Body Containing List Containing Entity elements    ${expectation_filename}    ${entities_ids_to_be_retrieved}    ${response['body']}
Loading