Loading TP/NGSI-LD/CommonBehaviours/043.robot +2 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ ${tea_filename}= bus-temporal-representation-unretrievable-context-sample.jsonl ${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_filename}= csourceRegistrations/context-source-registration-unretrievable-context-sample.jsonld *** comments *** *** Test Cases *** 043_01 Create entity [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create entity) Loading @@ -42,7 +42,6 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre [Teardown] Delete Subscription ${subscription_id} 043_03 Create Temporal Representation of Entities [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities) Loading @@ -69,7 +68,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre Check RL Response Body Containing ProblemDetails Element Containing Title Element ${response} [Teardown] Batch Delete Entities @{entities_to_be_created} *** Test Cases *** 043_05 Create context source registration [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create context source registration) Loading TP/NGSI-LD/CommonBehaviours/044_01.robot +7 −7 Original line number Diff line number Diff line Loading @@ -7,12 +7,12 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_filename}= vehicle-simple-attributes-sample.jsonld ${vehicle_fragment}= vehicle-brandname-fragment.jsonld ${vehicle_fragment}= vehicle-brandname-fragment.json ${attribute_id}= brandName ${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sample.jsonld ${subscription_filename}= subscriptions/subscription-sample.jsonld ${subscription_fragment}= subscriptions/fragments/subscription-update-sample.json *** Test Cases *** 044_01_01_endpoint /entities/{entityId}/attrs/{attrId} Loading @@ -22,7 +22,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa ${request} ${response}= Create Entity Selecting Content Type ${vehicle_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${vehicle_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${vehicle_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} context=${ngsild_test_suite_context} Check Response Status Code 204 ${response['status']} [Teardown] Delete Entity by Id ${entity_id} Loading @@ -34,7 +34,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa ${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} ${response}= Update Subscription ${subscription_id} ${subscription_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} ${response}= Update Subscription ${subscription_id} ${subscription_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} context=${ngsild_test_suite_context} Check Response Status Code 204 ${response['status']} [Teardown] Delete Subscription ${subscription_id} Loading data/entities/fragmentEntities/vehicle-brandname-fragment.json 0 → 100644 +6 −0 Original line number Diff line number Diff line { "https://ngsi-ld-test-suite/context#brandName": { "type": "Property", "value": "BMW" } } No newline at end of file data/entities/fragmentEntities/vehicle-brandname-fragment.jsonld +1 −1 Original line number Diff line number Diff line Loading @@ -3,5 +3,5 @@ "type": "Property", "value": "BMW" }, "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" "@context": "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 resources/ApiUtils.resource +2 −1 Original line number Diff line number Diff line Loading @@ -190,9 +190,10 @@ Delete Entity Attributes [return] ${response} Partial Update Entity Attributes [Arguments] ${entityId} ${attributeId} ${fragment_filename} ${content_type} ${accept}=${EMPTY} [Arguments] ${entityId} ${attributeId} ${fragment_filename} ${content_type} ${accept}=${EMPTY} ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} Run Keyword If '${accept}'!='' Set To Dictionary ${headers} Accept ${accept} Run Keyword If '${context}'!='' Set To Dictionary ${headers} Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" ${fragment_payload}= Load Json From File ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename} ${response}= PATCH ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId} body=${fragment_payload} headers=${headers} Output request Loading Loading
TP/NGSI-LD/CommonBehaviours/043.robot +2 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ ${tea_filename}= bus-temporal-representation-unretrievable-context-sample.jsonl ${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_filename}= csourceRegistrations/context-source-registration-unretrievable-context-sample.jsonld *** comments *** *** Test Cases *** 043_01 Create entity [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create entity) Loading @@ -42,7 +42,6 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre [Teardown] Delete Subscription ${subscription_id} 043_03 Create Temporal Representation of Entities [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities) Loading @@ -69,7 +68,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre Check RL Response Body Containing ProblemDetails Element Containing Title Element ${response} [Teardown] Batch Delete Entities @{entities_to_be_created} *** Test Cases *** 043_05 Create context source registration [Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create context source registration) Loading
TP/NGSI-LD/CommonBehaviours/044_01.robot +7 −7 Original line number Diff line number Diff line Loading @@ -7,12 +7,12 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${vehicle_filename}= vehicle-simple-attributes-sample.jsonld ${vehicle_fragment}= vehicle-brandname-fragment.jsonld ${vehicle_fragment}= vehicle-brandname-fragment.json ${attribute_id}= brandName ${subscription_id_prefix}= urn:ngsi-ld:Subscription: ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sample.jsonld ${subscription_filename}= subscriptions/subscription-sample.jsonld ${subscription_fragment}= subscriptions/fragments/subscription-update-sample.json *** Test Cases *** 044_01_01_endpoint /entities/{entityId}/attrs/{attrId} Loading @@ -22,7 +22,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa ${request} ${response}= Create Entity Selecting Content Type ${vehicle_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${vehicle_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${vehicle_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} context=${ngsild_test_suite_context} Check Response Status Code 204 ${response['status']} [Teardown] Delete Entity by Id ${entity_id} Loading @@ -34,7 +34,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa ${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} ${response}= Update Subscription ${subscription_id} ${subscription_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} ${response}= Update Subscription ${subscription_id} ${subscription_fragment} ${CONTENT_TYPE_MERGE_PATCH_JSON} context=${ngsild_test_suite_context} Check Response Status Code 204 ${response['status']} [Teardown] Delete Subscription ${subscription_id} Loading
data/entities/fragmentEntities/vehicle-brandname-fragment.json 0 → 100644 +6 −0 Original line number Diff line number Diff line { "https://ngsi-ld-test-suite/context#brandName": { "type": "Property", "value": "BMW" } } No newline at end of file
data/entities/fragmentEntities/vehicle-brandname-fragment.jsonld +1 −1 Original line number Diff line number Diff line Loading @@ -3,5 +3,5 @@ "type": "Property", "value": "BMW" }, "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld" "@context": "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
resources/ApiUtils.resource +2 −1 Original line number Diff line number Diff line Loading @@ -190,9 +190,10 @@ Delete Entity Attributes [return] ${response} Partial Update Entity Attributes [Arguments] ${entityId} ${attributeId} ${fragment_filename} ${content_type} ${accept}=${EMPTY} [Arguments] ${entityId} ${attributeId} ${fragment_filename} ${content_type} ${accept}=${EMPTY} ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} Run Keyword If '${accept}'!='' Set To Dictionary ${headers} Accept ${accept} Run Keyword If '${context}'!='' Set To Dictionary ${headers} Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" ${fragment_payload}= Load Json From File ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename} ${response}= PATCH ${ENTITIES_ENDPOINT_PATH}${entityId}/attrs/${attributeId} body=${fragment_payload} headers=${headers} Output request Loading