diff --git a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot index 4430c7fec1f913e563e649fa41a0817bec39509a..c2cbb462df2b77cd01a4e0b12e01ca45df3c0d3f 100644 --- a/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot +++ b/TP/NGSI-LD/ContextSource/Discovery/QueryContextSourceRegistrations/037_04.robot @@ -12,15 +12,16 @@ Suite Teardown Delete Created Context Source Registration *** Variables *** ${context_source_registration_id_prefix}= urn:ngsi-ld:ContextSourceRegistration: -${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-sample.jsonld +${context_source_registration_payload_file_path}= csourceRegistrations/context-source-registration-detailed-information-sample.jsonld ${expectation_file_path}= csourceRegistrations/expectations/context-source-registrations-037-04-expectation.json +${entity_type}= https://ngsi-ld-test-suite/context#Building *** Test Cases *** 037_04_01 Query Context Source Registrations Without Context [Documentation] Check that you can query context source registrations. If a JSON-LD context is not provided, then all the query terms shall be resolved against the default JSON-LD @context [Tags] csr-query 5_10_2 - ${response}= Query Context Source Registrations id=${context_source_registration_id} + ${response}= Query Context Source Registrations id=${context_source_registration_id} type=${entity_type} @{expected_context_source_registration_ids}= Create List ${context_source_registration_id} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Context Source Registrations elements diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot index c12761ce73b10ce36e564efa44e4c29623587dbb..3487a96dd0b831b514a8d07a530a0a36e829a84c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_01_02.robot @@ -11,7 +11,7 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -${registration_payload_file_path}= csourceRegistrations/context-source-registration-simple-sample.jsonld +${registration_payload_file_path}= csourceRegistrations/context-source-registration-sample.jsonld *** Test Cases *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot index 6ec328ca70549161b60a7954e95d2392dc32c526..cffdca07edf7381d366fad2c3c72ea8a38c3454c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_03.robot @@ -10,7 +10,7 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -${filename}= csourceRegistrations/context-source-registration-simple-sample.jsonld +${filename}= csourceRegistrations/context-source-registration-sample.jsonld *** Test Cases *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot index 9a13159ef2a700b9845f90cd0b841091cdd8f154..8247cb993a73295bf0e00ce435d0092afa11ea83 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_06.robot @@ -8,7 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -${registration_payload_file_path}= csourceRegistrations/context-source-registration-simple-sample.jsonld +${registration_payload_file_path}= csourceRegistrations/context-source-registration-sample.jsonld *** Test Cases *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot index 5c85cabe0cf6138365d2aa06d6cd66f45f0f837c..5b04fc52224d0d732f4c9d7aef334c117905139d 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_07.robot @@ -11,7 +11,7 @@ Suite Teardown Delete Created Context Source Registrations *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -${registration_payload_file_path}= csourceRegistrations/context-source-registration-simple-sample.jsonld +${registration_payload_file_path}= csourceRegistrations/context-source-registration-sample.jsonld *** Test Cases *** diff --git a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot index c11ec0473b788f69e27b23ecc5bba5f07a614f2a..cc17f1d982645163b5aa394c090cb2b89be27f54 100644 --- a/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot +++ b/TP/NGSI-LD/ContextSource/Registration/RegisterContextSource/033_09.robot @@ -8,7 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variables *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -${registration_payload_file_path}= csourceRegistrations/context-source-registration-simple-sample.jsonld +${registration_payload_file_path}= csourceRegistrations/context-source-registration-sample.jsonld *** Test Cases *** diff --git a/data/csourceRegistrations/context-source-registration-invalid-sample.jsonld b/data/csourceRegistrations/context-source-registration-invalid-sample.jsonld index 3a401bad106c5ef639b35dd5f91b09eb1a2e2bfd..06fe7cc9e7e0c620250ac8ee94a5d343ae3329c0 100644 --- a/data/csourceRegistrations/context-source-registration-invalid-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-invalid-sample.jsonld @@ -34,9 +34,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" - }, "@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/csourceRegistrations/context-source-registration-no-id-sample.jsonld b/data/csourceRegistrations/context-source-registration-no-id-sample.jsonld index ed9e1d8e80a60532279fd711986acc9e91667649..484ed252cdf95a7ea63c23127513d7db8f89edf4 100644 --- a/data/csourceRegistrations/context-source-registration-no-id-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-no-id-sample.jsonld @@ -33,9 +33,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" - }, "@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/csourceRegistrations/context-source-registration-past-expiration-sample.jsonld b/data/csourceRegistrations/context-source-registration-past-expiration-sample.jsonld index 38760ce0a79618028041f19dce0c68558fe503d8..6078f7b0da81cea9e55af6d22d1db1a0b8c82d67 100644 --- a/data/csourceRegistrations/context-source-registration-past-expiration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-past-expiration-sample.jsonld @@ -34,9 +34,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" - }, "expiresAt": " 2018-11-29T14:53:15Z", "@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/csourceRegistrations/context-source-registration-sample.jsonld b/data/csourceRegistrations/context-source-registration-sample.jsonld index 68ef4bc98b54bdee268c54440ad2d270bf3509bf..d24b35fd80a0409e072d6a9d02014d77bfe2b0f3 100644 --- a/data/csourceRegistrations/context-source-registration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-sample.jsonld @@ -34,9 +34,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": "2017-11-29T14:53:15Z" - }, "@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/csourceRegistrations/context-source-registration-simple-sample.jsonld b/data/csourceRegistrations/context-source-registration-simple-sample.jsonld deleted file mode 100644 index 7d83cbbcc3174b762ccb58543e3a46e04e8d68bc..0000000000000000000000000000000000000000 --- a/data/csourceRegistrations/context-source-registration-simple-sample.jsonld +++ /dev/null @@ -1,43 +0,0 @@ -{ - "id": "urn:ngsi-ld:ContextSourceRegistration:randomUUID", - "type": "ContextSourceRegistration", - "information": [ - { - "entities": [ - { - "id": "urn:ngsi-ld:Vehicle:A456", - "type": "Vehicle" - } - ], - "propertyNames": ["brandName","speed"], - "relationshipNames": ["isParked"] - }, - { - "entities": [ - { - "idPattern": ".*downtown$", - "type": "OffStreetParking" - }, - { - "idPattern": ".*47$", - "type": "OffStreetParking" - } - ], - "propertyNames": ["availableSpotNumber","totalSpotNumber"], - "relationshipNames": ["isNextToBuilding"] - } - ], - "endpoint": "http://my.csource.org:1026", - "location": { - "type": "Polygon", - "coordinates": [ - [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], - [100.0, 1.0], [100.0, 0.0]] ] - }, - "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" - }, - "@context": [ - "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" - ] -} \ No newline at end of file diff --git a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld index d638652d7c5cac869bd7a5f2840cc5661735aeae..0dbf966b7a07721827dbf9b131d4b14ba7026dcd 100644 --- a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld @@ -34,9 +34,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": "2017-11-29T14:53:15Z" - }, "expiresAt": "2025-11-29T14:53:15Z", "@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/csourceRegistrations/expectations/context-source-registrations-037-01-expectation.json b/data/csourceRegistrations/expectations/context-source-registrations-037-01-expectation.json index b8d0242e3ecdc250d2797b0dbda9dd6d18d54bb5..2b81da66dda4daf4521c5ffc313ca035ab54a104 100644 --- a/data/csourceRegistrations/expectations/context-source-registrations-037-01-expectation.json +++ b/data/csourceRegistrations/expectations/context-source-registrations-037-01-expectation.json @@ -1,18 +1,4 @@ [ - { - "id":"urn:ngsi-ld:ContextSourceRegistration:randomUUID", - "type":"ContextSourceRegistration", - "information":[ - { - "entities":[ - { - "type":"Building" - } - ] - } - ], - "endpoint":"http://my.csource.org:1026" - }, { "id":"urn:ngsi-ld:ContextSourceRegistration:randomUUID", "type":"ContextSourceRegistration", diff --git a/data/csourceRegistrations/fragments/context-source-registration-different-type-sample.jsonld b/data/csourceRegistrations/fragments/context-source-registration-different-type-sample.jsonld index 09591732571dea3f27c09e737163c293a9d39883..19ef6f5b589a19834df337eaf355ffe92865b3c8 100644 --- a/data/csourceRegistrations/fragments/context-source-registration-different-type-sample.jsonld +++ b/data/csourceRegistrations/fragments/context-source-registration-different-type-sample.jsonld @@ -34,9 +34,6 @@ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]] ] }, - "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" - }, "@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/resources/JsonUtils.resource b/resources/JsonUtils.resource index 52cd696931d7a5acba3124d1699cd64355bd7572..3e3d80148255ccc2920847ca7ca5f4b5a7cae86c 100644 --- a/resources/JsonUtils.resource +++ b/resources/JsonUtils.resource @@ -16,17 +16,17 @@ Load Entity [Arguments] ${entity_file_name} ${entity_id} ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/${entity_file_name} - ${entity}= Update Value To JSON ${entity_payload} $..id ${entity_id} + ${entity}= Update Value To JSON ${entity_payload} $.id ${entity_id} RETURN ${entity} Load Test Sample [Arguments] ${test_sample_file_path} ${test_sample_id}=${EMPTY} ${test_sample_payload}= Load JSON From File ${EXECDIR}/data/${test_sample_file_path} - ${test_sample}= Update Value To JSON ${test_sample_payload} $..id ${test_sample_id} + ${test_sample}= Update Value To JSON ${test_sample_payload} $.id ${test_sample_id} IF '${test_sample_id}'=='' - Delete Object From JSON ${test_sample} $..id + Delete Object From JSON ${test_sample} $.id END RETURN ${test_sample}