Skip to content

Commit

Permalink
The TRoE tests also needed updates for the improvement in Batch Upser…
Browse files Browse the repository at this point in the history
…t responses
  • Loading branch information
kzangeli committed Apr 18, 2021
1 parent cf6be9d commit 849f8bd
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,14 @@ echo
--REGEXPECT--
01. Upsert/Create the entity E1, with a user context
====================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 27
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entities:E1"
]


02. GET the entity without context (core) and see the longnames of entity-type and attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,15 @@ echo
--REGEXPECT--
01. Create entities E1 and E2
=============================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 53
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entities:E1",
"urn:ngsi-ld:entities:E2"
]


02. Batch Upsert entities E1-E4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,14 @@ echo
--REGEXPECT--
01. Use Batch Upsert to create an entity on tenant openiot, with a user context that is an array
================================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 33
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:Device:filling001"
]


02. See the entity in mongo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,14 @@ echo
--REGEXPECT--
01. Upsert/Create the entity E1, with a user context
====================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 27
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entities:E1"
]


02. GET the entity without context (core) and see the longnames of entity-type and attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,44 +993,80 @@ Date: REGEX(.*)

05. Upsert E7,E9 on default tenant, with user context in Link Header
====================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 49
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E7",
"urn:ngsi-ld:entity:E9"
]


06. Upsert E8,E10 on T1 tenant, with user context in Link Header
================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 50
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E8",
"urn:ngsi-ld:entity:E10"
]


07. Upsert E11,E13 on default tenant, with user context in payload body
=======================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E11",
"urn:ngsi-ld:entity:E13"
]


08. Upsert E12,E14 on T1 tenant, with user context in payload body
==================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E12",
"urn:ngsi-ld:entity:E14"
]


09. Upsert E15 with user context #1 and E17 with user context #2, in payload body, on default tenant
====================================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E15",
"urn:ngsi-ld:entity:E17"
]


10. Upsert E16 with user context #1 and E18 with user context #2, in payload body, on T1 tenant
===============================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E16",
"urn:ngsi-ld:entity:E18"
]


11. See all entities in TRoE DB, default tenant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,44 +993,80 @@ Date: REGEX(.*)

05. Upsert E7,E9 on default tenant, with user context in Link Header
====================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 49
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E7",
"urn:ngsi-ld:entity:E9"
]


06. Upsert E8,E10 on T1 tenant, with user context in Link Header
================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 50
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E8",
"urn:ngsi-ld:entity:E10"
]


07. Upsert E11,E13 on default tenant, with user context in payload body
=======================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E11",
"urn:ngsi-ld:entity:E13"
]


08. Upsert E12,E14 on T1 tenant, with user context in payload body
==================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E12",
"urn:ngsi-ld:entity:E14"
]


09. Upsert E15 with user context #1 and E17 with user context #2, in payload body, on default tenant
====================================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E15",
"urn:ngsi-ld:entity:E17"
]


10. Upsert E16 with user context #1 and E18 with user context #2, in payload body, on T1 tenant
===============================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 51
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E16",
"urn:ngsi-ld:entity:E18"
]


11. See all entities in TRoE DB, default tenant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,26 @@ echo
--REGEXPECT--
01. Batch Upsert entity E1 on default tenant and without context
================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E1"
]


02. Batch Upsert entity E2 on T1 tenant and without context
===========================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E2"
]


03. Batch Upsert entity E1+E3 on default tenant and without context - E1 replaced, E3 created
Expand All @@ -786,23 +796,39 @@ Date: REGEX(.*)

05. Batch Upsert entity E5 on default tenant and with user context in Link header
=================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E5"
]


06. Batch Upsert entity E6 on T1 tenant and with user context in Link header
============================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E6"
]


07. Batch Upsert entity E7+E9 on default tenant and with user contexts 1+2 in payload body
==========================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 49
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E7",
"urn:ngsi-ld:entity:E9"
]


08. Batch Upsert entity E8+E10 on T1 tenant and with user contexts 1+2 in payload body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,26 @@ echo
--REGEXPECT--
01. Batch Upsert entity E1 on default tenant and without context
================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E1"
]


02. Batch Upsert entity E2 on T1 tenant and without context
===========================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E2"
]


03. Batch Upsert entity E1+E3 on default tenant and without context - E1 updated, E3 created
Expand All @@ -786,23 +796,39 @@ Date: REGEX(.*)

05. Batch Upsert entity E5 on default tenant and with user context in Link header
=================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E5"
]


06. Batch Upsert entity E6 on T1 tenant and with user context in Link header
============================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 25
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E6"
]


07. Batch Upsert entity E7+E9 on default tenant and with user contexts 1+2 in payload body
==========================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 49
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entity:E7",
"urn:ngsi-ld:entity:E9"
]


08. Batch Upsert entity E8+E10 on T1 tenant and with user contexts 1+2 in payload body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,14 @@ echo
--REGEXPECT--
01. Create an entity E1 on tenant t1, with the context in the Link header using batch upsert
============================================================================================
HTTP/1.1 204 No Content
HTTP/1.1 201 Created
Content-Length: 27
Content-Type: application/json
Date: REGEX(.*)

[
"urn:ngsi-ld:entities:E1"
]


02. Make sure the postgres db ftest_t1 exists and that the entity and its attrs and all sub-attrs are present
Expand Down
Loading

0 comments on commit 849f8bd

Please sign in to comment.