From b43057adda8cd9731ce6b85d17c5119c583d4749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Wed, 27 Apr 2022 16:15:57 +0200 Subject: [PATCH 1/3] ADD cases/1492_limit_zero/limit_zero_simple_cases.test --- .../limit_zero_simple_cases.test | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test 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 new file mode 100644 index 0000000000..f46e1813e5 --- /dev/null +++ b/test/functionalTest/cases/1492_limit_zero/limit_zero_simple_cases.test @@ -0,0 +1,127 @@ +# Copyright 2022 Telefonica Investigacion y Desarrollo, S.A.U +# +# This file is part of Orion Context Broker. +# +# Orion Context Broker is free software: you can redistribute it and/or +# modify it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# Orion Context Broker is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +# General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Orion Context Broker. If not, see http://www.gnu.org/licenses/. +# +# For those usages not covered by this license please contact with +# iot_support at tid dot es + +# VALGRIND_READY - to mark the test ready for valgrindTestSuite.sh + +--NAME-- +Limit zero simple cases + +--SHELL-INIT-- +dbInit CB +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 +# +# + +echo "01. GET /v2/entities with limit = 0 and see error" +echo "=================================================" +orionCurl --url "/v2/entities?limit=0" +echo +echo + + +echo "02. GET /v2/types with limit = 0 and see error" +echo "==============================================" +orionCurl --url "/v2/types?limit=0" +echo +echo + + +echo "03. GET /v2/subscriptions with limit = 0 and see error" +echo "======================================================" +orionCurl --url "/v2/subscriptions?limit=0" +echo +echo + + +echo "04. GET /v2/registrations with limit = 0 and see error" +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 +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 +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 +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 +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-- +brokerStop CB +dbDrop CB From 303fa8ad79148c9414901eaddc0787e7e950f024 Mon Sep 17 00:00:00 2001 From: mapedraza Date: Wed, 27 Apr 2022 16:20:33 +0200 Subject: [PATCH 2/3] update RTD files --- .readthedocs.yml | 4 +++- doc/requirements.txt | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 doc/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index f5cafa0982..b287e6e4b9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,4 +4,6 @@ mkdocs: configuration: mkdocs.yml python: - version: 3.6 + version: 3.8 + install: + - requirements: doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000000..bd764162ea --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,4 @@ +mkdocs==1.2.3 +Pygments==2.9.0 +Markdown==3.3.4 +jinja2==3.0.0requi \ No newline at end of file From 915f6adc9fdbcc7b122cfbe22fcaf49f0296b3e7 Mon Sep 17 00:00:00 2001 From: mapedraza Date: Wed, 27 Apr 2022 16:20:50 +0200 Subject: [PATCH 3/3] fix errata --- doc/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index bd764162ea..6a0c8dce19 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,4 @@ mkdocs==1.2.3 Pygments==2.9.0 Markdown==3.3.4 -jinja2==3.0.0requi \ No newline at end of file +jinja2==3.0.0 \ No newline at end of file