Commits (4)
......@@ -22,6 +22,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre
*** Test Cases ***
043_01 Create entity
[Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create entity)
[Tags] e-create 5_2_2
${entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON}
......@@ -33,6 +34,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre
043_02 Create subscription
[Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create subscription)
[Tags] sub-create 5_2_2
${subscription_id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
......@@ -44,6 +46,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre
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)
[Tags] te-create 5_2_2
${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix}
${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${tea_filename} ${CONTENT_TYPE_LD_JSON}
......@@ -55,6 +58,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre
043_04 Batch entity create
[Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Batch entity create)
[Tags] be-create 5_2_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${second_entity_id}= Generate Random Entity Id ${building_id_prefix}
......@@ -71,7 +75,8 @@ ${registration_filename}= csourceRegistrations/context-source-registration-unre
043_05 Create context source registration
[Documentation] Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create context source registration)
[Tags] csr-create 5_2_2
${registration_id_prefix}= Generate Random Entity Id ${registration_id_prefix}
${payload}= Load Json From File ${EXECDIR}/data/${registration_filename}
......
......@@ -17,7 +17,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update-sample.js
*** Test Cases ***
044_01_01_endpoint /entities/{entityId}/attrs/{attrId}
[Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type
[Tags] mandatory
[Tags] ea-partial-update 6_3_4
${entity_id}= Generate Random Entity Id ${vehicle_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${vehicle_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......@@ -29,7 +29,7 @@ ${subscription_fragment}= subscriptions/fragments/subscription-update-sample.js
044_01_02_endpoint /subscriptions/{subscriptionId}
[Documentation] Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type
[Tags] mandatory
[Tags] sub-update 6_3_4
${subscription_id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${subscription_id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......
......@@ -29,6 +29,7 @@ ${content_type}= application/json
*** Test Cases ***
044_02_01_endpoint /entities/{entityId}
[Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/entities/{entityId})
[Tags] e-query 6_3_4
${id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${id} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......@@ -43,6 +44,7 @@ ${content_type}= application/json
044_02_02_endpoint /subscriptions/{subscriptionId}
[Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId})
[Tags] sub-retrieve 6_3_4
${id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
......@@ -58,6 +60,7 @@ ${content_type}= application/json
044_02_03_endpoint /csourceRegistrations/
[Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/csourceRegistrations/)
[Tags] csr-query 6_3_4
${registration_id}= Generate Random Entity Id ${registration_id_prefix}
${payload}= Load Json From File ${EXECDIR}/data/${registration_filename}
......@@ -75,7 +78,8 @@ ${content_type}= application/json
044_02_04_endpoint /temporal/entities
[Documentation] Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/temporal/entities)
[Tags] te-query 6_3_4
${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix}
Create Temporal Representation Of Entity ${tea_filename} ${temporal_entity_representation_id}
......
......@@ -25,6 +25,7 @@ ${content_type}= application/xml
*** Test Cases ***
044_03_01_endpoint patch /entities/{entityId}/attrs/{attrId}
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId})
[Tags] ea-partial-update 6_3_4
${entity_id}= Generate Random Entity Id ${vehicle_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${vehicle_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON}
......@@ -37,6 +38,7 @@ ${content_type}= application/xml
044_03_02_endpoint patch /subscriptions/{subscriptionId}
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /subscriptions/{subscriptionId})
[Tags] sub-update 6_3_4
${id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
......@@ -49,6 +51,7 @@ ${content_type}= application/xml
044_03_03_endpoint post /entities/
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entities/)
[Tags] e-create 6_3_4
${entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${entity_id} ${content_type}
......@@ -58,6 +61,7 @@ ${content_type}= application/xml
044_03_04_endpoint post /subscriptions/
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /subscriptions/)
[Tags] sub-create 6_3_4
${subscriptions_id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${subscriptions_id} ${subscription_filename} ${content_type}
......@@ -67,6 +71,7 @@ ${content_type}= application/xml
044_03_05_endpoint post /entityOperations/create
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entityOperations/create)
[Tags] be-create 6_3_4
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${second_entity_id}= Generate Random Entity Id ${building_id_prefix}
......@@ -83,7 +88,8 @@ ${content_type}= application/xml
044_03_06_endpoint post /temporal/entities/
[Documentation] Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /temporal/entities/)
[Tags] te-create 6_3_4
${temporal_entity_representation_id}= Generate Random Entity Id ${tea_id_prefix}
${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${tea_filename} ${content_type}
Check Response Status Code 415 ${response['status']}
......
......@@ -17,7 +17,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
*** Test Cases ***
044_04_01_endpoint get /entities/{entityId}
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /entities/{entityId})
[Tags] e-query 6_3_4
${entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${entity_id} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......@@ -29,7 +29,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
044_04_02_endpoint get /subscriptions/{subscriptionId}
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId})
[Tags] sub-retrieve 6_3_4
${id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......@@ -41,18 +41,19 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
044_04_03_endpoint get /csourceRegistrations/
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceRegistrations/)
[Tags] csr-query 6_3_4
${request} ${response}= Query Context Source Registrations With Return type=Building accept=${accept}
Check Response Status Code ${status_code} ${response['status']}
044_04_04_endpoint get /csourceSubscriptions/
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/)
[Tags] csrsub-query
Query Context Source Registration Subscriptions accept=${accept}
Check Response Status Code Set To ${status_code}
044_04_05_endpoint get /temporal/entities
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities)
[Tags] te-query 6_3_4
${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle
Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-08-01T12:05:00Z accept=${accept}
Check Response Status Code Set To ${status_code}
\ No newline at end of file
......@@ -14,7 +14,8 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
*** Test Cases ***
044_05_01 Retrieve subscription by id
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId})
[Tags] sub-retrieve 6_3_4
${id}= Generate Random Entity Id ${subscription_id_prefix}
${response}= Create Subscription ${id} ${subscription_filename} ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response['status']}
......@@ -26,12 +27,15 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
044_05_02 Query temporal entities
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities)
[Tags] te-query 6_3_4
${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle
Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-08-01T12:05:00Z accept=${accept}
Check Response Status Code Set To ${status_code}
044_05_03 Query context source registration
[Documentation] Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities)
[Tags] csr-query 6_3_4
${request} ${response}= Query Context Source Registrations With Return type=Building accept=${accept}
Check Response Status Code ${status_code} ${response['status']}
\ No newline at end of file
......@@ -13,7 +13,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building
*** Test Cases ***
Query several entities based on ids
[Documentation] Check that you can query several entities based on ids
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -20,7 +20,7 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking
*** Test Cases ***
Query several entities based on the entities types
[Documentation] Check that you can query several entities based on the entities types
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${building_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${building_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.*
*** Test Cases ***
Query several entities based on the given id pattern
[Documentation] Check that you can query several entities based on the given id pattern
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -16,7 +16,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory
*** Test Cases ***
Query several entities based on attribute names
[Documentation] Check that you can query several entities based on attribute names
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${geometry_property}= location
*** Test Cases ***
Query several entities based on a list of properties
[Documentation] Check that you can query entitites based on a list of properties
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -13,7 +13,7 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building
*** Test Cases ***
Query several entities via POST Interaction based on ids
[Documentation] Check that you can query several entities via POST Interaction based on ids
[Tags] /entityOperations/query 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -19,7 +19,7 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking
*** Test Cases ***
Query several entities via POST Interaction based on the entities types
[Documentation] Check that you can query several entities via POST Interaction based on the entities types
[Tags] /entityOperations/query 5_7_2
[Tags] e-query 5_7_2
${building_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${building_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.*
*** Test Cases ***
Query several entities via POST Interaction based on the given id pattern
[Documentation] Check that you can query several entities via POST Interaction based on the given id pattern
[Tags] /entityOperations/query 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCategory
*** Test Cases ***
Query several entities via POST Interaction based on attribute names
[Documentation] Check that you can query several entities via POST Interaction based on attribute names
[Tags] /entityOperations/query 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${geometry_property}= location
*** Test Cases ***
Query several entities via POST Interaction based on a list of properties
[Documentation] Check that you can query entitites via POST Interaction based on a list of properties
[Tags] /entityOperations/query 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -14,7 +14,7 @@ ${entity_invalid_id_two}= thisisaninvaliduri2
*** Test Cases ***
Query entities based on incorrect ids
[Documentation] Check that you cannot query entities if the requested ids are incorrect
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -16,7 +16,7 @@ ${invalid_entity_type_two}= invalid_entity_type_two
*** Test Cases ***
Query entities based on incorrect entity types
[Documentation] Check that you cannot query entities if the requested entity types are incorrect
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${building_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${building_filename} ${building_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -13,7 +13,7 @@ ${invalid_entity_id_pattern}= invalid_entity_id_pattern*
*** Test Cases ***
Query several entities based on incorrect id pattern
[Documentation] Check that you cannot query entities if the requested id pattern is incorrect
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......
......@@ -13,7 +13,7 @@ ${invalid_attribute_two}= invalid
*** Test Cases ***
Query several entities based on incorrect attribute names
[Documentation] Check that you cannot query entities if the requested attribute names are incorrect
[Tags] /entities/ 5_7_2
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
${request} ${response}= Create Entity Selecting Content Type ${filename} ${first_entity_id} ${CONTENT_TYPE_LD_JSON}
......