diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot index 0ba30bad518de009c726022295d40fb95f158498..41b01d0a5d7904c539302fddec1ae5ba9662955f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot @@ -56,10 +56,20 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id + # DELETE /entities/{id}/attrs/{name} is a current-state operation + # (TS 104-175 § 10.2.7) — it needs the entity to exist in the + # current-state representation. A POST /temporal/entities alone (per + # TS 104-175 § 11.2.2) creates only the temporal evolution. Mirror it + # on the current-state side so the DELETE under test can produce its + # `deletedAt` tombstone. See testsuite-doubts.md #9. + ${current_state_response}= Create Entity + ... vehicle-different-attribute-types.jsonld + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${current_state_response.status_code} ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} - Check Response Status Code 201 ${create_response.status_code} + Should Be True "${create_response.status_code}" in ["201", "204"] msg=POST /temporal/entities expected 201 (created) or 204 (appended to existing), got ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot index c0d03906f7768112107496c943a7c120db020512..2afdb72e3b82d46f29b72cb9321e0317c5033a68 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot @@ -59,10 +59,20 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id + # DELETE /entities/{id}/attrs/{name} is a current-state operation + # (TS 104-175 § 10.2.7) — it needs the entity to exist in the + # current-state representation. A POST /temporal/entities alone (per + # TS 104-175 § 11.2.2) creates only the temporal evolution. Mirror it + # on the current-state side so the DELETE under test can produce its + # `deletedAt` tombstone. See testsuite-doubts.md #9. + ${current_state_response}= Create Entity + ... vehicle-different-attribute-types.jsonld + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${current_state_response.status_code} ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} - Check Response Status Code 201 ${create_response.status_code} + Should Be True "${create_response.status_code}" in ["201", "204"] msg=POST /temporal/entities expected 201 (created) or 204 (appended to existing), got ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot index a699ee496703eabfad0b72a4200a3f0acfda25e8..c516f6280cf1b30eca5ee93798ebd187ac74ed42 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot @@ -50,10 +50,20 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id + # DELETE /entities/{id}/attrs/{name} is a current-state operation + # (TS 104-175 § 10.2.7) — it needs the entity to exist in the + # current-state representation. A POST /temporal/entities alone (per + # TS 104-175 § 11.2.2) creates only the temporal evolution. Mirror it + # on the current-state side so the DELETE under test can produce its + # `deletedAt` tombstone. See testsuite-doubts.md #9. + ${current_state_response}= Create Entity + ... vehicle-with-scope.jsonld + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${current_state_response.status_code} ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} - Check Response Status Code 201 ${create_response.status_code} + Should Be True "${create_response.status_code}" in ["201", "204"] msg=POST /temporal/entities expected 201 (created) or 204 (appended to existing), got ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot index 28df0620dde31a7fb46e2b7c1063775f2a8d7513..b5e9418700bdcd17f6c9e603d868fa53a9468fce 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot @@ -51,10 +51,20 @@ Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute Create Temporal Entity ${temporal_entity_representation_id}= Generate Random Vehicle Entity Id + # DELETE /entities/{id}/attrs/{name} is a current-state operation + # (TS 104-175 § 10.2.7) — it needs the entity to exist in the + # current-state representation. A POST /temporal/entities alone (per + # TS 104-175 § 11.2.2) creates only the temporal evolution. Mirror it + # on the current-state side so the DELETE under test can produce its + # `deletedAt` tombstone. See testsuite-doubts.md #9. + ${current_state_response}= Create Entity + ... vehicle-with-scope.jsonld + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${current_state_response.status_code} ${create_response}= Create Temporal Representation Of Entity ... ${vehicle_payload_file} ... ${temporal_entity_representation_id} - Check Response Status Code 201 ${create_response.status_code} + Should Be True "${create_response.status_code}" in ["201", "204"] msg=POST /temporal/entities expected 201 (created) or 204 (appended to existing), got ${create_response.status_code} Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity diff --git a/data/entities/vehicle-different-attribute-types.jsonld b/data/entities/vehicle-different-attribute-types.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..8d496639e026d8f16c778f8a5a4902f36834ffa0 --- /dev/null +++ b/data/entities/vehicle-different-attribute-types.jsonld @@ -0,0 +1,25 @@ +{ + "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" + ] +} diff --git a/data/entities/vehicle-with-scope.jsonld b/data/entities/vehicle-with-scope.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..68bf9282ec92aec1670c41d82ab3e1abcc1b9649 --- /dev/null +++ b/data/entities/vehicle-with-scope.jsonld @@ -0,0 +1,13 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "scope": "/Madrid/Gardens/ParqueNorte", + "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" + ] +}