Commit 7fa60d00 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix: misc problems in 010_01

- ignore reason for notUpdated attributes
- add attributeName in expected response on 207 cases
- expect test suite context in responses if provided in the query
- fix expected response missing instances with previous datasetIds
parent 308e7776
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -49,7 +49,8 @@ Append Attributes With Params

    ${response}=    Append Entity Attributes With Parameters    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}    noOverwrite
    Check Response Status Code  ${status_code}    ${response['status']}
    Run Keyword If    "${expectation_response_body}"!="${EMPTY}"    Check Response Body Content    ${expectation_response_body}    ${response['body']}
    # ignore the reason for the not updated attribute as this detail is up to each context broker implementation
    Run Keyword If    "${expectation_response_body}"!="${EMPTY}"    Check Response Body Content    ${expectation_response_body}    ${response['body']}      root\\['notUpdated'\\]\\[0\\]\\['reason'\\]

    ${entity_expectation_payload}=    Load Test Sample   entities/expectations/${expectation_filename}    ${entity_id}
    Retrieve Entity by Id   ${entity_id}   context=${ngsild_test_suite_context}   accept=${CONTENT_TYPE_LD_JSON}
+6 −1
Original line number Diff line number Diff line
@@ -2,5 +2,10 @@
    "updated":[
       "https://uri.etsi.org/ngsi-ld/default-context/attribute_to_be_added"
    ],
    "notUpdated":[ ]
    "notUpdated":[ 
      {
         "attributeName": "https://ngsi-ld-test-suite/context#speed",
         "reason": "a reason ignored during the comparison"
      }
    ]
 }
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -39,6 +39,6 @@
        "observedAt": "2017-07-29T12:00:04Z"
    },
    "@context": [
        "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
        "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld"
    ]
}
 No newline at end of file
+28 −8
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@
        "type": "Property",
        "value": "Mercedes"
    },
    "speed": {
    "speed": [
        {
            "type": "Property",
            "source": {
                "type": "Property",
@@ -14,6 +15,25 @@
            "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed2",
            "value": 56
        },
        {
            "type": "Property",
            "source": {
                "type": "Property",
                "value": "GPS"
            },
            "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed",
            "value": 54.5
        },
        {
            "type": "Property",
            "source": {
                "type": "Property",
                "value": "Speedometer"
            },
            "datasetId": "urn:ngsi-ld:Property:speedometer",
            "value": 55
        }
    ],
    "attribute_to_be_added": {
        "type": "Property",
        "value": 23
@@ -28,6 +48,6 @@
        "observedAt": "2017-07-29T12:00:04Z"
    },
    "@context": [
        "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
        "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld"
    ]
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
            "type": "Property",
            "value": "Speedometer"
        },
        "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" 
        "datasetId": "urn:ngsi-ld:Property:speedometer" 
    },
    "attribute_to_be_added": {
        "type": "Property",
Loading