diff --git a/test/functionalTest/cases/0000_bad_requests/pagination_error_in_uri_params.test b/test/functionalTest/cases/0000_bad_requests/pagination_error_in_uri_params.test index 7a4f3c0083..e02e0732d1 100644 --- a/test/functionalTest/cases/0000_bad_requests/pagination_error_in_uri_params.test +++ b/test/functionalTest/cases/0000_bad_requests/pagination_error_in_uri_params.test @@ -43,10 +43,19 @@ orionCurl --url "$url" --payload "$payload" echo echo - +# After fixing issue #1492 this has become a not-bad request case, but we keep +# in this file for simplicity (NGSIv1 is a deprecated API) echo "+++++ 3. URI param 'limit' == 0" url="/v1/queryContext?limit=000000" -payload='NO PAYLOAD NECESSARY' +payload='{ + "entities": [ + { + "type": "", + "isPattern": "false", + "id": "EVector" + } + ] +}' orionCurl --url "$url" --payload "$payload" echo echo @@ -94,16 +103,15 @@ Date: REGEX(.*) +++++ 3. URI param 'limit' == 0 HTTP/1.1 200 OK -Content-Length: 86 +Content-Length: 70 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) { "errorCode": { - "code": "400", - "details": "JSON Parse Error", - "reasonPhrase": "Bad Request" + "code": "404", + "reasonPhrase": "No context element found" } } diff --git a/test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test b/test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test index f46e1813e5..f83f9a34f6 100644 --- a/test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test +++ b/test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test @@ -30,96 +30,84 @@ brokerStart CB --SHELL-- # -# 01. GET /v2/entities with limit = 0 and see error -# 02. GET /v2/types with limit = 0 and see error -# 03. GET /v2/subscriptions with limit = 0 and see error -# 04. GET /v2/registrations with limit = 0 and see error +# 01. GET /v2/entities with limit = 0 +# 02. GET /v2/types with limit = 0 +# 03. GET /v2/subscriptions with limit = 0 +# 04. GET /v2/registrations with limit = 0 # # -echo "01. GET /v2/entities with limit = 0 and see error" -echo "=================================================" +echo "01. GET /v2/entities with limit = 0" +echo "===================================" orionCurl --url "/v2/entities?limit=0" echo echo -echo "02. GET /v2/types with limit = 0 and see error" -echo "==============================================" +echo "02. GET /v2/types with limit = 0" +echo "================================" orionCurl --url "/v2/types?limit=0" echo echo -echo "03. GET /v2/subscriptions with limit = 0 and see error" -echo "======================================================" +echo "03. GET /v2/subscriptions with limit = 0" +echo "========================================" orionCurl --url "/v2/subscriptions?limit=0" echo echo -echo "04. GET /v2/registrations with limit = 0 and see error" -echo "======================================================" +echo "04. GET /v2/registrations with limit = 0" +echo "========================================" orionCurl --url "/v2/registrations?limit=0" echo echo --REGEXPECT-- -01. GET /v2/entities with limit = 0 and see error -================================================= -HTTP/1.1 400 Bad Request -Content-Length: 98 +01. GET /v2/entities with limit = 0 +=================================== +HTTP/1.1 200 OK +Content-Length: 2 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) -{ - "description": "Bad pagination limit: /0/ [a value of ZERO is unacceptable]", - "error": "BadRequest" -} +[] -02. GET /v2/types with limit = 0 and see error -============================================== -HTTP/1.1 400 Bad Request -Content-Length: 98 +02. GET /v2/types with limit = 0 +================================ +HTTP/1.1 200 OK +Content-Length: 2 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) -{ - "description": "Bad pagination limit: /0/ [a value of ZERO is unacceptable]", - "error": "BadRequest" -} +[] -03. GET /v2/subscriptions with limit = 0 and see error -====================================================== -HTTP/1.1 400 Bad Request -Content-Length: 98 +03. GET /v2/subscriptions with limit = 0 +======================================== +HTTP/1.1 200 OK +Content-Length: 2 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) -{ - "description": "Bad pagination limit: /0/ [a value of ZERO is unacceptable]", - "error": "BadRequest" -} +[] -04. GET /v2/registrations with limit = 0 and see error -====================================================== -HTTP/1.1 400 Bad Request -Content-Length: 98 +04. GET /v2/registrations with limit = 0 +======================================== +HTTP/1.1 200 OK +Content-Length: 2 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) -{ - "description": "Bad pagination limit: /0/ [a value of ZERO is unacceptable]", - "error": "BadRequest" -} +[] --TEARDOWN--