Loading TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/SuccessCases.robot→TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot +22 −21 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot: 22 added lines, 21 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that the IUT accepts the creation of an entity Documentation Check that you can create a batch of entities Variables ../../../../../../resources/variables.py #Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/ApiUtils.resource Library REST ${url} Library JSONSchemaLibrary ${EXECDIR}/schemas Library BuiltIn Library OperatingSystem *** Variable *** ${endpoint}= entities ${id}= urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 ${endpoint}= entityOperations/create *** Test Case *** SuccessCases_MinimalEntity [Documentation] Create an entity with a JSON-LD payload containing the minimal information AlreadyExists [Documentation] Check that you can create a batch of entities [Tags] critical Create Entity building-minimal.jsonld Check HTTP Status Code Is 201 Delete Entity by Id ${id} SuccessCases_EntityWithSimpleProperties [Documentation] Create an entity with a JSON-LD payload containing only simple properties Create Entity building-simple-attributes.jsonld Batch Create Entities filename=building-minimal.jsonld filename_2=building-minimal-2.jsonld Check HTTP Status Code Is 201 Delete Entity by Id ${id} # it will be replaced by on call Batch Delete Entities Delete Entity by Id urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 Delete Entity by Id urn:ngsi-ld:Building:56hy789-eft6-9987-be54-adr45nf567ddz *** Keywords *** Create Entity [Arguments] ${filename} &{headers}= Create Dictionary Content-Type=application/ld+json authorization=Bearer ${token} ${response}= POST ${endpoint} body=${CURDIR}/data/${filename} headers=${headers} Batch Create Entities [Arguments] ${filename} ${filename_2} &{headers}= Create Dictionary Content-Type=application/ld+json ${file_content}= Get File ${EXECDIR}/data/${filename} ${file_content_2}= Get File ${EXECDIR}/data/${filename_2} ${body}= Create List ${file_content} ${file_content_2} log ${body} ${response}= POST ${endpoint} body=${body} headers=${headers} Output request Output response Set Test Variable ${response} Loading @@ -39,7 +41,6 @@ Check HTTP Status Code Is Delete Entity by Id [Arguments] ${id} &{headers}= Create Dictionary authorization=Bearer ${token} ${response}= DELETE ${endpoint}/${id} headers=${headers} ${response}= DELETE ${endpoint}/${id} Output request Output response TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/AlreadyExists.robot +5 −7 Changes for TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/AlreadyExists.robot: 5 added lines, 7 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that the IUT refuses to create an entity if one exists with the same identifier Variables ../../../../../../resources/variables.py #Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/ApiUtils.resource Library REST ${url} Library JSONSchemaLibrary ${CURDIR}/schemas Library JSONSchemaLibrary ${EXECDIR}/schemas Library BuiltIn #Suite Setup Create Entity building-minimal.jsonld Loading @@ -20,13 +20,12 @@ AlreadyExists Create Entity building-minimal.jsonld Check HTTP Status Code Is 409 Check HTTP Response Body Json Schema Is error_response Delete Entity by Id urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 *** Keywords *** Create Entity [Arguments] ${filename} &{headers}= Create Dictionary Content-Type=application/ld+json authorization=Bearer ${token} ${response}= POST ${endpoint} body=${CURDIR}/data/${filename} headers=${headers} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST ${endpoint} body=${EXECDIR}/data/${filename} headers=${headers} Output request Output response Set Test Variable ${response} Loading @@ -45,7 +44,6 @@ Check HTTP Response Body Json Schema Is Delete Entity by Id [Arguments] ${id} &{headers}= Create Dictionary authorization=Bearer ${token} ${response}= DELETE ${endpoint}/${id} headers=${headers} ${response}= DELETE ${endpoint}/${id} Output request Output response TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/SuccessCases-datadriven.robot −42 File deleted. Show changes TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/data/building-location-attribute.jsonld→data/building-location-attribute.jsonld File moved. View file data/building-minimal-2.jsonld +8 Changes for data/building-minimal-2.jsonld: 8 added lines, 0 removed lines. Original line number Diff line number Diff line { "id": "urn:ngsi-ld:Building:56hy789-eft6-9987-be54-adr45nf567ddz", "type": "Building", "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } No newline at end of file Loading
TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/SuccessCases.robot→TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot +22 −21 Changes for TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/fullSuccess.robot: 22 added lines, 21 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that the IUT accepts the creation of an entity Documentation Check that you can create a batch of entities Variables ../../../../../../resources/variables.py #Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/ApiUtils.resource Library REST ${url} Library JSONSchemaLibrary ${EXECDIR}/schemas Library BuiltIn Library OperatingSystem *** Variable *** ${endpoint}= entities ${id}= urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 ${endpoint}= entityOperations/create *** Test Case *** SuccessCases_MinimalEntity [Documentation] Create an entity with a JSON-LD payload containing the minimal information AlreadyExists [Documentation] Check that you can create a batch of entities [Tags] critical Create Entity building-minimal.jsonld Check HTTP Status Code Is 201 Delete Entity by Id ${id} SuccessCases_EntityWithSimpleProperties [Documentation] Create an entity with a JSON-LD payload containing only simple properties Create Entity building-simple-attributes.jsonld Batch Create Entities filename=building-minimal.jsonld filename_2=building-minimal-2.jsonld Check HTTP Status Code Is 201 Delete Entity by Id ${id} # it will be replaced by on call Batch Delete Entities Delete Entity by Id urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 Delete Entity by Id urn:ngsi-ld:Building:56hy789-eft6-9987-be54-adr45nf567ddz *** Keywords *** Create Entity [Arguments] ${filename} &{headers}= Create Dictionary Content-Type=application/ld+json authorization=Bearer ${token} ${response}= POST ${endpoint} body=${CURDIR}/data/${filename} headers=${headers} Batch Create Entities [Arguments] ${filename} ${filename_2} &{headers}= Create Dictionary Content-Type=application/ld+json ${file_content}= Get File ${EXECDIR}/data/${filename} ${file_content_2}= Get File ${EXECDIR}/data/${filename_2} ${body}= Create List ${file_content} ${file_content_2} log ${body} ${response}= POST ${endpoint} body=${body} headers=${headers} Output request Output response Set Test Variable ${response} Loading @@ -39,7 +41,6 @@ Check HTTP Status Code Is Delete Entity by Id [Arguments] ${id} &{headers}= Create Dictionary authorization=Bearer ${token} ${response}= DELETE ${endpoint}/${id} headers=${headers} ${response}= DELETE ${endpoint}/${id} Output request Output response
TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/AlreadyExists.robot +5 −7 Changes for TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/AlreadyExists.robot: 5 added lines, 7 removed lines. Original line number Diff line number Diff line *** Settings *** Documentation Check that the IUT refuses to create an entity if one exists with the same identifier Variables ../../../../../../resources/variables.py #Resource ../../../../../../resources/ApiUtils.resource Resource ../../../../../../resources/ApiUtils.resource Library REST ${url} Library JSONSchemaLibrary ${CURDIR}/schemas Library JSONSchemaLibrary ${EXECDIR}/schemas Library BuiltIn #Suite Setup Create Entity building-minimal.jsonld Loading @@ -20,13 +20,12 @@ AlreadyExists Create Entity building-minimal.jsonld Check HTTP Status Code Is 409 Check HTTP Response Body Json Schema Is error_response Delete Entity by Id urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9 *** Keywords *** Create Entity [Arguments] ${filename} &{headers}= Create Dictionary Content-Type=application/ld+json authorization=Bearer ${token} ${response}= POST ${endpoint} body=${CURDIR}/data/${filename} headers=${headers} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST ${endpoint} body=${EXECDIR}/data/${filename} headers=${headers} Output request Output response Set Test Variable ${response} Loading @@ -45,7 +44,6 @@ Check HTTP Response Body Json Schema Is Delete Entity by Id [Arguments] ${id} &{headers}= Create Dictionary authorization=Bearer ${token} ${response}= DELETE ${endpoint}/${id} headers=${headers} ${response}= DELETE ${endpoint}/${id} Output request Output response
TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/SuccessCases-datadriven.robot −42 File deleted. Show changes
TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/data/building-location-attribute.jsonld→data/building-location-attribute.jsonld File moved. View file
data/building-minimal-2.jsonld +8 Changes for data/building-minimal-2.jsonld: 8 added lines, 0 removed lines. Original line number Diff line number Diff line { "id": "urn:ngsi-ld:Building:56hy789-eft6-9987-be54-adr45nf567ddz", "type": "Building", "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] } No newline at end of file