Skip to content
Commits on Source (4)
...@@ -15,15 +15,16 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -15,15 +15,16 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** FILENAME *** Test Cases *** FILENAME
MinimalEntity [Tags] be-create 5_6_7 003_01_01 MinimalEntity
[Tags] be-create 5_6_7
building-minimal-sample.jsonld building-minimal-sample.jsonld
EntityWithSimpleProperties 003_01_02 EntityWithSimpleProperties
[Tags] be-create 5_6_7 [Tags] be-create 5_6_7
building-simple-attributes-sample.jsonld building-simple-attributes-sample.jsonld
EntityWithSimpleRelationships 003_01_03 EntityWithSimpleRelationships
[Tags] be-create 5_6_7 [Tags] be-create 5_6_7
building-relationship-sample.jsonld building-relationship-sample.jsonld
EntityWithRelationshipsProperties 003_01_04 EntityWithRelationshipsProperties
[Tags] be-create 5_6_7 [Tags] be-create 5_6_7
building-relationship-of-property-sample.jsonld building-relationship-of-property-sample.jsonld
......
...@@ -15,7 +15,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -15,7 +15,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of two valid entities and one invalid entity 003_02_01 Create a batch of two valid entities and one invalid entity
[Documentation] Check that you can create a batch of two valid entities and one invalid entity [Documentation] Check that you can create a batch of two valid entities and one invalid entity
[Tags] be-create 5_6_7 [Tags] be-create 5_6_7
${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
......
...@@ -9,9 +9,11 @@ Test Template Create Batch Entity With Invalid Request Scenarios ...@@ -9,9 +9,11 @@ Test Template Create Batch Entity With Invalid Request Scenarios
*** Test Cases *** FILENAME PROBLEM_TYPE *** Test Cases *** FILENAME PROBLEM_TYPE
InvalidJson [Tags] be-create 5_6_7 003_03_01 InvalidJson
[Tags] be-create 5_6_7
batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST} batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST}
EmptyJson [Tags] be-create 5_6_7 003_03_01 EmptyJson
[Tags] be-create 5_6_7
batch/empty-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA} batch/empty-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA}
......
...@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity using a provided Link header with JSON content type 003_04_01 Create a batch of one entity using a provided Link header with JSON content type
[Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json" [Documentation] Check that the @context is obtained from a Link Header if the Content-Type header is "application/json"
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
...@@ -25,10 +25,10 @@ Create a batch of one entity using a provided Link header with JSON content type ...@@ -25,10 +25,10 @@ Create a batch of one entity using a provided Link header with JSON content type
... content_type=${CONTENT_TYPE_JSON} ... content_type=${CONTENT_TYPE_JSON}
... context=${ngsild_test_suite_context} ... context=${ngsild_test_suite_context}
Check Response Status Code 201 ${response.status_code} Check Response Status Code 201 ${response.status_code}
${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} ${response}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context}
# Attribute should be compacted as we used the same context as provided when creating the entity # Attribute should be compacted as we used the same context as provided when creating the entity
Check Response Body Containing an Attribute set to almostFull ${response.json()} Check Response Body Containing an Attribute set to almostFull ${response.json()}
${response}= Retrieve Entity by Id ${entity_id} ${response}= Retrieve Entity by Id id=${entity_id}
# Attribute should not be compacted as we did not provide a context containing this attribute # Attribute should not be compacted as we did not provide a context containing this attribute
Check Response Body Containing an Attribute set to Check Response Body Containing an Attribute set to
... https://ngsi-ld-test-suite/context#almostFull ... https://ngsi-ld-test-suite/context#almostFull
......
...@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity using the default context with JSON content type 003_05_01 Create a batch of one entity using the default context with JSON content type
[Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context [Documentation] Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
...@@ -22,10 +22,10 @@ Create a batch of one entity using the default context with JSON content type ...@@ -22,10 +22,10 @@ Create a batch of one entity using the default context with JSON content type
@{entities_to_be_created}= Create List ${entity} @{entities_to_be_created}= Create List ${entity}
${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_JSON} ${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_JSON}
Check Response Status Code 201 ${response.status_code} Check Response Status Code 201 ${response.status_code}
${response}= Retrieve Entity by Id ${entity_id} ${response}= Retrieve Entity by Id id=${entity_id}
# Attribute should be compacted as we used the same default context as provided when creating the entity # Attribute should be compacted as we used the same default context as provided when creating the entity
Check Response Body Containing an Attribute set to almostFull ${response.json()} Check Response Body Containing an Attribute set to almostFull ${response.json()}
${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} ${response}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context}
# Attribute should not be compacted as we did not provide a context containing this term # Attribute should not be compacted as we did not provide a context containing this term
Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull ${response.json()} Check Response Body Containing an Attribute set to ngsi-ld:default-context/almostFull ${response.json()}
......
...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity containing a JSON-LD @context with a JSON content type 003_06_01 Create a batch of one entity containing a JSON-LD @context with a JSON content type
[Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
......
...@@ -13,8 +13,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -13,8 +13,8 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity using a JSON-LD @context obtained from the request payload 003_07_01 Create a batch of one entity using a JSON-LD @context obtained from the request payload
[Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" [Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and ther response attribute should be compacted as we used the same context as provided when creating the entity
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
Set Suite Variable ${entity_id} Set Suite Variable ${entity_id}
...@@ -22,10 +22,22 @@ Create a batch of one entity using a JSON-LD @context obtained from the request ...@@ -22,10 +22,22 @@ Create a batch of one entity using a JSON-LD @context obtained from the request
@{entities_to_be_created}= Create List ${entity} @{entities_to_be_created}= Create List ${entity}
${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_LD_JSON} ${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response.status_code} Check Response Status Code 201 ${response.status_code}
${response}= Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} ${response}= Retrieve Entity by Id id=${entity_id} context=${ngsild_test_suite_context}
# Attribute should be compacted as we used the same context as provided when creating the entity # Attribute should be compacted as we used the same context as provided when creating the entity
Check Response Body Containing an Attribute set to almostFull ${response.json()} Check Response Body Containing an Attribute set to
${response}= Retrieve Entity by Id ${entity_id} ... almostFull
... ${response.json()}
003_07_02 Create a batch of one entity using a JSON-LD @context obtained from the request payload
[Documentation] Check that the @context is obtained from the request payload body itself if the Content-Type header is "application/ld+json" and response attribute should not be compacted as we did not provide a context containing this term
[Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix}
Set Suite Variable ${entity_id}
${entity}= Load Entity building-simple-attributes-sample.jsonld ${entity_id}
@{entities_to_be_created}= Create List ${entity}
${response}= Batch Create Entities @{entities_to_be_created} content_type=${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response.status_code}
${response}= Retrieve Entity by Id id=${entity_id}
# Attribute should not be compacted as we did not provide a context containing this term # Attribute should not be compacted as we did not provide a context containing this term
Check Response Body Containing an Attribute set to Check Response Body Containing an Attribute set to
... https://ngsi-ld-test-suite/context#almostFull ... https://ngsi-ld-test-suite/context#almostFull
......
...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity not containing a JSON-LD @context with a JSON-LD content type 003_08_01 Create a batch of one entity not containing a JSON-LD @context with a JSON-LD content type
[Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
......
...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -11,7 +11,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Create a batch of one entity with a Link header and a JSON-LD content type 003_09_01 Create a batch of one entity with a Link header and a JSON-LD content type
[Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request [Documentation] Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and a JSON-LD Link header is present in the incoming HTTP request
[Tags] be-create 6_3_5 [Tags] be-create 6_3_5
${entity_id}= Generate Random Entity Id ${building_id_prefix} ${entity_id}= Generate Random Entity Id ${building_id_prefix}
......
...@@ -14,7 +14,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -14,7 +14,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Delete a batch of entities 006_01_01 Delete a batch of entities
[Documentation] Check that you can delete a batch of entities [Documentation] Check that you can delete a batch of entities
[Tags] be-delete 5_6_10 [Tags] be-delete 5_6_10
@{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id}
......
...@@ -14,7 +14,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -14,7 +14,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** *** Test Cases ***
Delete a batch of non-existing and existing entities 006_01_01 Delete a batch of non-existing and existing entities
[Documentation] Check that you can delete a batch of non-existing and existing entities [Documentation] Check that you can delete a batch of non-existing and existing entities
[Tags] be-delete 5_6_10 [Tags] be-delete 5_6_10
${new_entity_id}= Generate Random Entity Id ${building_id_prefix} ${new_entity_id}= Generate Random Entity Id ${building_id_prefix}
......
...@@ -9,9 +9,9 @@ Test Template Batch Delete Entity With Invalid Request Scenarios ...@@ -9,9 +9,9 @@ Test Template Batch Delete Entity With Invalid Request Scenarios
*** Test Cases *** FILENAME PROBLEM_TYPE *** Test Cases *** FILENAME PROBLEM_TYPE
InvalidJson [Tags] be-delete 5_6_10 006_03_01 InvalidJson [Tags] be-delete 5_6_10
batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST} batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST}
EmptyJson [Tags] be-delete 5_6_10 006_03_02 EmptyJson [Tags] be-delete 5_6_10
batch/empty-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA} batch/empty-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA}
......
...@@ -17,10 +17,10 @@ ${entity_payload_filename}= building-simple-attributes-sample.jsonld ...@@ -17,10 +17,10 @@ ${entity_payload_filename}= building-simple-attributes-sample.jsonld
*** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME *** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME
EntityWithSimpleProperties 005_01_01 EntityWithSimpleProperties
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
building-simple-attributes-sample.jsonld fragmentEntities/empty-fragment.json building-simple-attributes-sample.jsonld fragmentEntities/empty-fragment.json
EntityWithSimpleRelationships 005_01_02 EntityWithSimpleRelationships
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json
EntityWithRelationshipsProperties EntityWithRelationshipsProperties
......
...@@ -17,13 +17,13 @@ ${entity_payload_filename}= building-simple-attributes-sample.jsonld ...@@ -17,13 +17,13 @@ ${entity_payload_filename}= building-simple-attributes-sample.jsonld
*** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME EXPECTED_STATUS *** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME EXPECTED_STATUS
EntityWithSimpleProperties 005_02_01 EntityWithSimpleProperties
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
building-simple-attributes-sample.jsonld fragmentEntities/empty-fragment.json 207 building-simple-attributes-sample.jsonld fragmentEntities/empty-fragment.json 207
EntityWithSimpleRelationships 005_02_02 EntityWithSimpleRelationships
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json 204 building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json 204
EntityWithRelationshipsProperties 005_02_03 EntityWithRelationshipsProperties
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
building-relationship-of-property-sample.jsonld fragmentEntities/empty-fragment.json 207 building-relationship-of-property-sample.jsonld fragmentEntities/empty-fragment.json 207
......
...@@ -17,7 +17,7 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship- ...@@ -17,7 +17,7 @@ ${update_fragment_filename}= fragmentEntities/simple-attributes-relationship-
*** Test Cases *** *** Test Cases ***
Update a batch of non-existing and existing entities 005_03_01 Update a batch of non-existing and existing entities
[Documentation] Check that you can update a batch of non-existing and existing entities [Documentation] Check that you can update a batch of non-existing and existing entities
[Tags] be-update 5_6_9 [Tags] be-update 5_6_9
${first_existing_entity}= Load Entity ${first_existing_entity}= Load Entity
......
...@@ -9,9 +9,9 @@ Test Template Batch Update Entity With Invalid Request Scenarios ...@@ -9,9 +9,9 @@ Test Template Batch Update Entity With Invalid Request Scenarios
*** Test Cases *** FILENAME PROBLEM_TYPE *** Test Cases *** FILENAME PROBLEM_TYPE
InvalidJson [Tags] be-update 5_6_9 005_04_01 InvalidJson [Tags] be-update 5_6_9
batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST} batch/invalid-json-sample.jsonld ${ERROR_TYPE_INVALID_REQUEST}
InvalidJsonLd [Tags] be-update 5_6_9 005_04_02 InvalidJsonLd [Tags] be-update 5_6_9
batch/invalid-json-ld-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA} batch/invalid-json-ld-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA}
......
...@@ -15,13 +15,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -15,13 +15,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** FILENAME *** Test Cases *** FILENAME
EntityWithSimpleProperties 004_01_01 EntityWithSimpleProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-simple-attributes-sample.jsonld building-simple-attributes-sample.jsonld
EntityWithSimpleRelationships 004_01_02 EntityWithSimpleRelationships
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-sample.jsonld building-relationship-sample.jsonld
EntityWithRelationshipsProperties 004_01_03 EntityWithRelationshipsProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-of-property-sample.jsonld building-relationship-of-property-sample.jsonld
......
...@@ -16,13 +16,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -16,13 +16,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** FILENAME *** Test Cases *** FILENAME
EntityWithSimpleProperties 004_02_01 EntityWithSimpleProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-simple-attributes-sample.jsonld building-simple-attributes-sample.jsonld
EntityWithSimpleRelationships 004_02_02 EntityWithSimpleRelationships
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-sample.jsonld building-relationship-sample.jsonld
EntityWithRelationshipsProperties 004_02_03 EntityWithRelationshipsProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-of-property-sample.jsonld building-relationship-of-property-sample.jsonld
......
...@@ -16,13 +16,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ...@@ -16,13 +16,13 @@ ${building_id_prefix}= urn:ngsi-ld:Building:
*** Test Cases *** FILENAME *** Test Cases *** FILENAME
EntityWithSimpleProperties 004_03_01 EntityWithSimpleProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-simple-attributes-sample.jsonld building-simple-attributes-sample.jsonld
EntityWithSimpleRelationships 004_03_02 EntityWithSimpleRelationships
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-sample.jsonld building-relationship-sample.jsonld
EntityWithRelationshipsProperties 004_03_03 EntityWithRelationshipsProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-of-property-sample.jsonld building-relationship-of-property-sample.jsonld
......
...@@ -17,13 +17,13 @@ ${existing_entity_payload_filename}= building-minimal-sample.jsonld ...@@ -17,13 +17,13 @@ ${existing_entity_payload_filename}= building-minimal-sample.jsonld
*** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME *** Test Cases *** FILENAME UPDATE_FRAGMENT_FILENAME
EntityWithSimpleProperties 004_04_01 EntityWithSimpleProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-simple-attributes-sample.jsonld fragmentEntities/simple-attributes-fragment.json building-simple-attributes-sample.jsonld fragmentEntities/simple-attributes-fragment.json
EntityWithSimpleRelationships 004_04_02 EntityWithSimpleRelationships
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json building-relationship-sample.jsonld fragmentEntities/locatedAt-fragment.json
EntityWithRelationshipsProperties 004_04_03 EntityWithRelationshipsProperties
[Tags] be-upsert 5_6_8 [Tags] be-upsert 5_6_8
building-relationship-of-property-sample.jsonld fragmentEntities/simple-attributes-relationship-of-property-fragment.json building-relationship-of-property-sample.jsonld fragmentEntities/simple-attributes-relationship-of-property-fragment.json
......