diff --git a/spec/test/features/control/append/error_malformed.feature b/spec/test/features/control/append/error_malformed.feature index d2ee083..e64414d 100644 --- a/spec/test/features/control/append/error_malformed.feature +++ b/spec/test/features/control/append/error_malformed.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Kapow! server reject append requests with malformed JSON bodies. Kapow! server will reject to append a route when it receives a malformed json document in the diff --git a/spec/test/features/control/append/error_unprocessable.feature b/spec/test/features/control/append/error_unprocessable.feature index 128ece7..1a21b46 100644 --- a/spec/test/features/control/append/error_unprocessable.feature +++ b/spec/test/features/control/append/error_unprocessable.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Kapow! server rejects requests with semantic errors. Kapow! server will refuse to append routes when it receives a valid json document not conforming diff --git a/spec/test/features/control/append/success.feature b/spec/test/features/control/append/success.feature index 0ab5581..bf67e0c 100644 --- a/spec/test/features/control/append/success.feature +++ b/spec/test/features/control/append/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Append new routes in Kapow! server. Appending routes allows users to configure the server. New routes are added at the end of the list of existing routes. diff --git a/spec/test/features/control/delete/error_notfound.feature b/spec/test/features/control/delete/error_notfound.feature index 4064ce9..d70292a 100644 --- a/spec/test/features/control/delete/error_notfound.feature +++ b/spec/test/features/control/delete/error_notfound.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Fail to delete a route in Kapow! server. When trying to delete a route that not exists in the server the server respons with an error. diff --git a/spec/test/features/control/delete/list_order.feature b/spec/test/features/control/delete/list_order.feature index c0197e3..876b74f 100644 --- a/spec/test/features/control/delete/list_order.feature +++ b/spec/test/features/control/delete/list_order.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Consistent route order after a route deletion in Kapow! server. When deleting routes the server will mantain the remaining routes ordered and with consecutive indexes. diff --git a/spec/test/features/control/delete/success.feature b/spec/test/features/control/delete/success.feature index 8b60dac..614f186 100644 --- a/spec/test/features/control/delete/success.feature +++ b/spec/test/features/control/delete/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Delete routes in Kapow! server. Deleting routes allows users to remove undesired routes from the server. diff --git a/spec/test/features/control/get/error_notfound.feature b/spec/test/features/control/get/error_notfound.feature index 2a85b17..69e1e31 100644 --- a/spec/test/features/control/get/error_notfound.feature +++ b/spec/test/features/control/get/error_notfound.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Fail to retrieve route details in Kapow! server. When trying to get route details for a route that does no exist the server responds with an error. diff --git a/spec/test/features/control/get/success.feature b/spec/test/features/control/get/success.feature index e723fa5..b7dddd0 100644 --- a/spec/test/features/control/get/success.feature +++ b/spec/test/features/control/get/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Retrieve route details in Kapow! server. Users can retrieve route details from the server by specifying its id. diff --git a/spec/test/features/control/insert/error_malformed.feature b/spec/test/features/control/insert/error_malformed.feature index 74ea132..cef66a8 100644 --- a/spec/test/features/control/insert/error_malformed.feature +++ b/spec/test/features/control/insert/error_malformed.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Kapow! server rejects insertion requests with malformed JSON bodies. Kapow! server will reject to insert a route when it receives a malformed JSON document in the diff --git a/spec/test/features/control/insert/error_unprocessable.feature b/spec/test/features/control/insert/error_unprocessable.feature index c90898d..ab33b3e 100644 --- a/spec/test/features/control/insert/error_unprocessable.feature +++ b/spec/test/features/control/insert/error_unprocessable.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Kapow! server rejects insertion requests with semantic errors. Kapow! server will refuse to insert routes when it receives a valid JSON but not conforming document. diff --git a/spec/test/features/control/insert/list_order.feature b/spec/test/features/control/insert/list_order.feature index 57ecd90..1925198 100644 --- a/spec/test/features/control/insert/list_order.feature +++ b/spec/test/features/control/insert/list_order.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Consistent route ordering after inserting a route in a Kapow! server. When inserting routes the server will mantain the whole set of routes ordered and with consecutive indexes. diff --git a/spec/test/features/control/insert/success.feature b/spec/test/features/control/insert/success.feature index 61ff11e..59a26be 100644 --- a/spec/test/features/control/insert/success.feature +++ b/spec/test/features/control/insert/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Insert new routes in Kapow! server. Inserting routes allows users to configure the server. New routes could be inserted at the beginning or before any diff --git a/spec/test/features/control/list/success.feature b/spec/test/features/control/list/success.feature index 711435f..0361043 100644 --- a/spec/test/features/control/list/success.feature +++ b/spec/test/features/control/list/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Listing routes in a Kapow! server. Listing routes allows users to know what URLs are available on a Kapow! server. The List endpoint returns diff --git a/spec/test/features/data/handler/error_handleridnotfound.feature b/spec/test/features/data/handler/error_handleridnotfound.feature index 1e12d3e..cd50195 100644 --- a/spec/test/features/data/handler/error_handleridnotfound.feature +++ b/spec/test/features/data/handler/error_handleridnotfound.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Fail to retrieve resources from nonexistent handler in Kapow! server. If trying to access a nonexistent handler then the server responds with a not found error. diff --git a/spec/test/features/data/handler/error_invalidresource.feature b/spec/test/features/data/handler/error_invalidresource.feature index 7f289f0..73dcc94 100644 --- a/spec/test/features/data/handler/error_invalidresource.feature +++ b/spec/test/features/data/handler/error_invalidresource.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Fail to retrieve an invalid resource for a handler in Kapow! server. If trying to access an invalid resource for a handler then the server responds with an error. diff --git a/spec/test/features/data/handler/error_itemnotfound.feature b/spec/test/features/data/handler/error_itemnotfound.feature index 002935d..887446a 100644 --- a/spec/test/features/data/handler/error_itemnotfound.feature +++ b/spec/test/features/data/handler/error_itemnotfound.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Fail to retrieve nonexistent resource items in Kapow! server. If trying to access a nonexistent resource item then the server responds with a no content error. diff --git a/spec/test/features/data/handler/success.feature b/spec/test/features/data/handler/success.feature index 9e458ec..dc18c63 100644 --- a/spec/test/features/data/handler/success.feature +++ b/spec/test/features/data/handler/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Retrieve a resource from a handler in Kapow! server. Users can retrieve request handler resources from the server by specifying the handler id diff --git a/spec/test/features/data/request/success.feature b/spec/test/features/data/request/success.feature index 3f51053..03ca2a9 100644 --- a/spec/test/features/data/request/success.feature +++ b/spec/test/features/data/request/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Retrieve request resources from a handler in Kapow! server. Users can retrieve request resources by specifying the handler id and the diff --git a/spec/test/features/data/response/success.feature b/spec/test/features/data/response/success.feature index 96dae3e..bc51836 100644 --- a/spec/test/features/data/response/success.feature +++ b/spec/test/features/data/response/success.feature @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Feature: Setting values for handler response resources in Kapow! server. Users can set the values in the response resources by specifying the handler id diff --git a/spec/test/features/environment.py b/spec/test/features/environment.py index fda4764..1dffa4c 100644 --- a/spec/test/features/environment.py +++ b/spec/test/features/environment.py @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import tempfile import os diff --git a/spec/test/features/steps/comparedict.py b/spec/test/features/steps/comparedict.py index 01eebf1..81510cb 100644 --- a/spec/test/features/steps/comparedict.py +++ b/spec/test/features/steps/comparedict.py @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# from functools import singledispatch from itertools import zip_longest from jsonexample import ANY diff --git a/spec/test/features/steps/jsonexample.py b/spec/test/features/steps/jsonexample.py index 19e9290..f29a577 100644 --- a/spec/test/features/steps/jsonexample.py +++ b/spec/test/features/steps/jsonexample.py @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import json from functools import partial import re diff --git a/spec/test/features/steps/steps.py b/spec/test/features/steps/steps.py index f8eb43c..5adfa63 100644 --- a/spec/test/features/steps/steps.py +++ b/spec/test/features/steps/steps.py @@ -1,3 +1,18 @@ +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# from contextlib import suppress from time import sleep import json diff --git a/spec/test/features/steps/testinghandler.py b/spec/test/features/steps/testinghandler.py index a3c832b..4c442b6 100644 --- a/spec/test/features/steps/testinghandler.py +++ b/spec/test/features/steps/testinghandler.py @@ -1,4 +1,21 @@ #!/usr/bin/env python + +# +# Copyright 2019 Banco Bilbao Vizcaya Argentaria, S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + import signal import sys import os