fix(020_17-020_20, 008_01): temporal setups without current-state pairing or duplicate timestamps (#95)

  • 020_17 / 020_18 / 020_19 / 020_20: the setup creates a regular entity (vehicle-different-attribute-types.jsonld, vehicle-with-scope.jsonld, new) instead of pairing a current-state POST into the temporal setup; the teardown deletes the entity and its temporal representation.
  • 020_19 / 020_20 expectations: a deleted scope is the NGSI-LD Null "urn:ngsi-ld:null" (TS 104-175 clause 4.18, 5.3.2.5), not [].
  • 008_01: the update re-sent instances at the timestamps the create had used. It now adds instances at new timestamps only, and the expectation is the union of both (append-only, TS 104-175 clause 5.6.11.4).

Tested - Against coraine: 0 / 9 on develop -> 9 / 9 (020_17 x3, 020_18 x3, 020_19, 020_20, 008_01).

🤖 Generated with Claude Code

Edited by Ken Zangelin

Merge request reports

Loading
+7 −6
Changes for TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot: 7 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Create Temporal Entity
Test Teardown       Delete Initial Temporal Entity
Test Setup          Create Entity With The Attributes
Test Teardown       Delete Initial Entity
Test Template       Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute


*** Variables ***
${vehicle_payload_file}=    vehicle-temporal-representation-different-attributes-types.jsonld
${vehicle_payload_file}=    vehicle-different-attribute-types.jsonld


*** Test Cases ***    ATTR_NAME    EXPECTATION_FILENAME
@@ -54,13 +54,14 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute
    ...    json_object=${response2.json()}
    ...    json_path=['${attr_name}'][0]['deletedAt']

Create Temporal Entity
Create Entity With The Attributes
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
    ${create_response}=    Create Temporal Representation Of Entity
    ${create_response}=    Create Entity
    ...    ${vehicle_payload_file}
    ...    ${temporal_entity_representation_id}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${temporal_entity_representation_id}

Delete Initial Temporal Entity
Delete Initial Entity
    Delete Entity    ${temporal_entity_representation_id}
    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+7 −6
Changes for TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot: 7 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Create Temporal Entity
Test Teardown       Delete Initial Temporal Entity
Test Setup          Create Entity With The Attributes
Test Teardown       Delete Initial Entity
Test Template       Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute


*** Variables ***
${vehicle_payload_file}=    vehicle-temporal-representation-different-attributes-types.jsonld
${vehicle_payload_file}=    vehicle-different-attribute-types.jsonld


*** Test Cases ***    ATTR_NAME    SIMPLIFIED_TEMPORAL_KEY    EXPECTATION_FILENAME
@@ -57,13 +57,14 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute
    ...    json_object=${response2.json()}
    ...    json_path=['${attr_name}']['${simplified_temporal_key}'][0][1]

Create Temporal Entity
Create Entity With The Attributes
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
    ${create_response}=    Create Temporal Representation Of Entity
    ${create_response}=    Create Entity
    ...    ${vehicle_payload_file}
    ...    ${temporal_entity_representation_id}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${temporal_entity_representation_id}

Delete Initial Temporal Entity
Delete Initial Entity
    Delete Entity    ${temporal_entity_representation_id}
    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+7 −6
Changes for TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot: 7 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Create Temporal Entity
Test Teardown       Delete Initial Temporal Entity
Test Setup          Create Entity With The Attributes
Test Teardown       Delete Initial Entity
Test Template       Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute


*** Variables ***
${vehicle_payload_file}=    vehicle-temporal-representation-scope.jsonld
${vehicle_payload_file}=    vehicle-with-scope.jsonld


*** Test Cases ***    EXPECTATION_FILENAME
@@ -48,13 +48,14 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute
    ...    json_object=${response2.json()}
    ...    json_path=['scope'][0]['deletedAt']

Create Temporal Entity
Create Entity With The Attributes
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
    ${create_response}=    Create Temporal Representation Of Entity
    ${create_response}=    Create Entity
    ...    ${vehicle_payload_file}
    ...    ${temporal_entity_representation_id}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${temporal_entity_representation_id}

Delete Initial Temporal Entity
Delete Initial Entity
    Delete Entity    ${temporal_entity_representation_id}
    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+7 −6
Changes for TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot: 7 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProv
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Create Temporal Entity
Test Teardown       Delete Initial Temporal Entity
Test Setup          Create Entity With The Attributes
Test Teardown       Delete Initial Entity
Test Template       Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute


*** Variables ***
${vehicle_payload_file}=    vehicle-temporal-representation-scope.jsonld
${vehicle_payload_file}=    vehicle-with-scope.jsonld


*** Test Cases ***    EXPECTATION_FILENAME
@@ -49,13 +49,14 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute
    ...    json_object=${response2.json()}
    ...    json_path=['scope']['values'][0][1]

Create Temporal Entity
Create Entity With The Attributes
    ${temporal_entity_representation_id}=    Generate Random Vehicle Entity Id
    ${create_response}=    Create Temporal Representation Of Entity
    ${create_response}=    Create Entity
    ...    ${vehicle_payload_file}
    ...    ${temporal_entity_representation_id}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${temporal_entity_representation_id}

Delete Initial Temporal Entity
Delete Initial Entity
    Delete Entity    ${temporal_entity_representation_id}
    Delete Temporal Representation Of Entity    ${temporal_entity_representation_id}
+25 −0
Changes for data/entities/vehicle-different-attribute-types.jsonld: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
  "id": "urn:ngsi-ld:Vehicle:randomUUID",
  "type": "Vehicle",
  "isParkedIn": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:OffStreetParking:Commerce",
    "observedAt": "2024-12-01T12:00:00Z"
  },
  "name": {
    "type": "LanguageProperty",
    "languageMap": {
      "fr": "Ma voiture",
      "en": "My vehicle"
    },
    "observedAt": "2024-12-01T12:00:00Z"
  },
  "fuelLevel": {
    "type": "Property",
    "value": 67,
    "observedAt": "2020-08-01T12:03:00Z"
  },
  "@context": [
    "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
  ]
}
Loading
Loading