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

fix(044_02): only check what is related to response content type

parent 4c172e34
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -7,18 +7,13 @@ Resource ${EXECDIR}/resources/JsonUtils.resource
*** Variable ***
${building_id_prefix}=    urn:ngsi-ld:Building:
${building_filename}=    building-simple-attributes-sample.jsonld
${building_expectation}=    building-simple-attributes-sample-expectation.json
${entity_type}=    https://ngsi-ld-test-suite/context#Building
${subscription_id_prefix}=    urn:ngsi-ld:Subscription:
${subscription_filename}=    subscriptions/subscription-sample.jsonld
${subscription_expectation}=    subscription-sample-expectation.json
${registration_id_prefix}=    urn:ngsi-ld:Registration:
${registration_filename}=    csourceRegistrations/context-source-registration-with-expiration-sample.jsonld
${registration_expectation}=    context-source-registration-with-expiration-expectation.json
${registration_type}=    Vehicle
${tea_id_prefix}=    urn:ngsi-ld:Vehicle:
${tea_filename}=    vehicle-temporal-representation-sample.jsonld
${tea_expectation}=    vehicles-temporal-representation-044-02-04-expectation.json
${teatype}=       Vehicle
${content_type}=    application/json

@@ -31,7 +26,6 @@ ${content_type}= application/json
    Check Response Status Code    201    ${response['status']}
    ${request}    ${response}=    Query Entity    ${id}    context=${ngsild_test_suite_context}    accept=*/*
    Check Response Status Code    200    ${response['status']}
    Check Response Body Containing Entity element    ${building_expectation}    ${id}    ${response['body']}
    Check Response Headers Containing Content-Type set to    ${response}    ${content_type}
    Check Response Headers Link Not Empty    ${response}
    [Teardown]    Delete Entity by Id Returning Response    ${id}
@@ -44,7 +38,6 @@ ${content_type}= application/json
    Check Response Status Code    201    ${response['status']}
    ${request}    ${response}=    Retrieve Subscription    ${id}    accept=*/*
    Check Response Status Code    200    ${response['status']}
    Check Response Body Containing One Subscription element    ${subscription_expectation}    ${response['body']}
    Check Response Headers Containing Content-Type set to    ${response}    ${content_type}
    Check Response Headers Link Not Empty    ${response}
    [Teardown]    Delete Subscription    ${id}
@@ -59,7 +52,6 @@ ${content_type}= application/json
    Check Response Status Code    201    ${response['status']}
    ${request}    ${response}=    Query Context Source Registrations With Return    id=${registration_id}    type=${registration_type}    context=${ngsild_test_suite_context}    accept=*/*
    Check Response Status Code    200    ${response['status']}
    Check Response Body Containing One Registration element    ${registration_expectation}    ${response['body']}
    Check Response Headers Containing Content-Type set to    ${response}    ${content_type}
    Check Response Headers Link Not Empty    ${response}
    [Teardown]    Delete Context Source Registration    ${registration_id}
@@ -73,7 +65,6 @@ ${content_type}= application/json
    ${request}    ${response}=    Query Temporal Representation Of Entities With Return    entity_types=${teatype}    timerel=after    timeAt=2020-08-01T12:05:00Z    context=${ngsild_test_suite_context}    accept=*/*
    Check Response Status Code    200    ${response['status']}
    Set Test Variable    ${response}
    Check Response Body Containing EntityTemporal element    ${tea_expectation}    ${temporal_entity_representation_id}
    Check Response Headers Containing Content-Type set to    ${response}    ${content_type}
    Check Response Headers Link Not Empty    ${response}
    [Teardown]    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+0 −60
Original line number Diff line number Diff line
    {
        "id": "urn:ngsi-ld:Registration:randomUUID",
        "type": "ContextSourceRegistration",
        "timestamp": {},
        "endpoint": "http://my.csource.org:1026",
        "information": [
            {
                "entities": [
                    {
                        "id": "urn:ngsi-ld:Registration:3911535208644330",
                        "type": "Vehicle"
                    }
                ],
                "ngsi-ld:properties": [],
                "ngsi-ld:relationships": []
            },
            {
                "entities": [
                    {
                        "type": "OffStreetParking",
                        "idPattern": ".*downtown$"
                    },
                    {
                        "type": "OffStreetParking",
                        "idPattern": ".*47$"
                    }
                ],
                "ngsi-ld:properties": [],
                "ngsi-ld:relationships": []
            }
        ],
        "ngsi-ld:internal": false,
        "location": {
            "type": "Polygon",
            "coordinates": [
                [
                    [
                        100.0,
                        0.0
                    ],
                    [
                        101.0,
                        0.0
                    ],
                    [
                        101.0,
                        1.0
                    ],
                    [
                        100.0,
                        1.0
                    ],
                    [
                        100.0,
                        0.0
                    ]
                ]
            ]
        }
    }
 No newline at end of file
+0 −17
Original line number Diff line number Diff line
{
   "id":"urn:ngsi-ld:Subscription:randomUUID",
   "type": "Subscription",
   "entities": [
       {
           "type": "https://ngsi-ld-test-suite/context#Building"
       }
   ],
   "timeInterval": 5,
   "notification": {
       "endpoint": {
           "accept": "application/json",
           "uri": "http://my.endpoint.org/notify"
       },
       "format": "keyValues"
   }
}
 No newline at end of file
+0 −22
Original line number Diff line number Diff line
{
    "id": "urn:ngsi-ld:Building:randomUUID",
    "type": "Building",
    "airQualityLevel": {
        "type": "Property",
        "value": 4,
        "observedAt": "2020-09-09T16:40:00.000Z",
        "unitCode": "C62"
    },
    "almostFull": {
        "type": "Property",
        "value": false
    },
    "subCategory": {
        "type": "Property",
        "value": "tourism"
    },
    "name": {
        "type": "Property",
        "value": "Eiffel Tower"
    }
}
 No newline at end of file
+0 −76
Original line number Diff line number Diff line
[
   {
      "id":"urn:ngsi-ld:Vehicle:randomUUID",
      "type":"Vehicle",
      "brandName":{
         "type":"Property",
         "value":"Volvo"
      },
      "fuelLevel":[
         {
            "type":"Property",
            "value":53,
            "observedAt":"2020-08-01T13:05:00Z"
         },
         {
            "type":"Property",
            "value":40,
            "observedAt":"2020-08-01T14:07:00Z"
         }
      ],
      "speed":[
         {
            "type":"Property",
            "value":80,
            "observedAt":"2020-08-01T12:05:00Z"
         },
         {
            "type":"Property",
            "value":100,
            "observedAt":"2020-08-01T12:07:00Z"
         }
      ]
   },
   {
      "id":"urn:ngsi-ld:Vehicle:randomUUID",
      "type":"Vehicle",
      "brandName":{
         "type":"Property",
         "value":"BMW"
      },
      "fuelLevel":[
         {
            "type":"Property",
            "value":67,
            "observedAt":"2020-09-01T12:03:00Z"
         },
         {
            "type":"Property",
            "value":53,
            "observedAt":"2020-09-01T13:05:00Z"
         },
         {
            "type":"Property",
            "value":40,
            "observedAt":"2020-09-01T14:07:00Z"
         }
      ],
      "speed":[
         {
            "type":"Property",
            "value":120,
            "observedAt":"2020-09-01T12:03:00Z"
         },
         {
            "type":"Property",
            "value":80,
            "observedAt":"2020-09-01T12:05:00Z"
         },
         {
            "type":"Property",
            "value":100,
            "observedAt":"2020-09-01T12:07:00Z"
         }
      ]
   }
]
 No newline at end of file