diff --git a/spec/test/features/control/append/error_malformed.feature b/spec/test/features/control/append/error_malformed.feature index 2ed88de..1cf657f 100644 --- a/spec/test/features/control/append/error_malformed.feature +++ b/spec/test/features/control/append/error_malformed.feature @@ -1,4 +1,4 @@ -Feature: Kapow! server reject responses with malformed JSON bodies. +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 request body. @@ -20,5 +20,5 @@ Feature: Kapow! server reject responses with malformed JSON bodies. } """ Then I get 400 as response code - And I get "Malformed JSON" as response phrase - And I get an empty response body + And I get "Malformed JSON" as response phrase + And I get an empty response body diff --git a/spec/test/features/control/delete/list_order.feature b/spec/test/features/control/delete/list_order.feature index b599aba..ba855ab 100644 --- a/spec/test/features/control/delete/list_order.feature +++ b/spec/test/features/control/delete/list_order.feature @@ -1,4 +1,4 @@ -Feature: Routes auto-ordering in a Kapow! server. +Feature: Routes auto-ordering after deleting in a Kapow! server. When deleting routes the server will mantain the remaining routes ordered an with consecutive indexes. @@ -12,54 +12,55 @@ Feature: Routes auto-ordering in a Kapow! server. | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | Scenario: Removing the first routes. - When removing the first route the remaining ones + + After removing the first route the remaining ones will maintain their relative order and their indexes will be decreased by one. When I delete the first route inserted Then I get 200 as response code - And I get "OK" as response phrase - And I get an empty response body + And I get "OK" as response phrase + And I get an empty response body When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | - | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | + | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | Scenario: Removing the last routes. - When removing the last route the remaining ones will + After removing the last route the remaining ones will maintain their relative order and indexes. When I delete the last route inserted Then I get 200 as response code - And I get "OK" as response phrase - And I get an empty response body + And I get "OK" as response phrase + And I get an empty response body When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | - | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | + | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 2 | * | Scenario: Removing a midst route. - When removing a midst route the remaining ones will + After removing a midst route the remaining ones will maintain their relative order and the indexes of the following routes will be decreased by one. When I delete the second route inserted Then I get 200 as response code - And I get "OK" as response phrase - And I get an empty response body + And I get "OK" as response phrase + And I get an empty response body When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | - | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | + | GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | diff --git a/spec/test/features/control/insert/error_malformed.feature b/spec/test/features/control/insert/error_malformed.feature index fda85fa..40e50b2 100644 --- a/spec/test/features/control/insert/error_malformed.feature +++ b/spec/test/features/control/insert/error_malformed.feature @@ -1,4 +1,4 @@ -Feature: Kapow! server reject responses with malformed JSON bodies. +Feature: Kapow! server reject insert requests with malformed JSON bodies. Kapow! server will reject to insert a route when it receives a malformed json document in the request body. @@ -21,5 +21,5 @@ Feature: Kapow! server reject responses with malformed JSON bodies. } """ Then I get bad request as response code - And I get "Malformed JSON" as response phrase - And I get an empty response body + And I get "Malformed JSON" as response phrase + And I get an empty response body diff --git a/spec/test/features/control/insert/error_unprocessable.feature b/spec/test/features/control/insert/error_unprocessable.feature index 357a3bc..2600f15 100644 --- a/spec/test/features/control/insert/error_unprocessable.feature +++ b/spec/test/features/control/insert/error_unprocessable.feature @@ -12,10 +12,10 @@ Feature: Kapow! server reject insert responses with semantic errors. | entrypoint | command | | /bin/sh -c | ls -la / \| response /body | Then I get 422 as response code - And I get "Missing Mandatory Field" as response reason phrase - And I get the following entity as response body: - | missing_mandatory_fields | - | "url_pattern", "method" | + And I get "Missing Mandatory Field" as response reason phrase + And I get the following entity as response body: + | missing_mandatory_fields | + | "url_pattern", "method" | Scenario: Error because of wrong route specification. If a request contains an invalid expression in the @@ -26,8 +26,8 @@ Feature: Kapow! server reject insert responses with semantic errors. | method | url_pattern | entrypoint | command | index | | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | Then I get 422 as response code - And I get "Invalid Route Spec" as response reason phrase - And I get an empty response body + And I get "Invalid Route Spec" as response reason phrase + And I get an empty response body Scenario: Error because of wrong method value. If a request contains an invalid value in the @@ -38,5 +38,5 @@ Feature: Kapow! server reject insert responses with semantic errors. | method | url_pattern | entrypoint | command | index | | AVECES | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | Then I get 422 as response code - And I get "Invalid Data Type" as response reason phrase - And I get an empty response body + And I get "Invalid Data Type" as response reason phrase + And I get an empty response body diff --git a/spec/test/features/control/insert/list_order.feature b/spec/test/features/control/insert/list_order.feature index b3b63f1..2c3db06 100644 --- a/spec/test/features/control/insert/list_order.feature +++ b/spec/test/features/control/insert/list_order.feature @@ -1,4 +1,4 @@ -Feature: Routes auto-ordering in a Kapow! server. +Feature: Routes auto-ordering after inserting in a Kapow! server. When inserting routes the server will mantain the whole set of routes ordered an with consecutive indexes. @@ -10,7 +10,7 @@ Feature: Routes auto-ordering in a Kapow! server. | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | Scenario: Inserting before the first route. - When inserting before the first route the previous set + After inserting before the first route the previous set will maintain their relative order and their indexes will be increased by one. @@ -18,42 +18,42 @@ Feature: Routes auto-ordering in a Kapow! server. | method | url_pattern | entrypoint | command | index | | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | Then I get 200 as response code - And I get "OK" as response phrase - And I get the following entity as response body: - | method | url_pattern | entrypoint | command | index | id | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | + And I get "OK" as response phrase + And I get the following entity as response body: + | method | url_pattern | entrypoint | command | index | id | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 1 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 1 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | Scenario: Inserting after the last routes. - When inserting after the last route the previous set + After inserting after the last route the previous set will maintain their relative order and indexes. When I insert the route: | method | url_pattern | entrypoint | command | index | | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | Then I get 200 as response code - And I get "OK" as response phrase - And I get the following entity as response body: - | method | url_pattern | entrypoint | command | index | id | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * | + And I get "OK" as response phrase + And I get the following entity as response body: + | method | url_pattern | entrypoint | command | index | id | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * | When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * | Scenario: Inserting a midst route. - When inserting a midst route the previous route set + After inserting a midst route the previous route set will maintain their relative order and the indexes of thefollowing routes will be increased by one. @@ -61,15 +61,15 @@ Feature: Routes auto-ordering in a Kapow! server. | method | url_pattern | entrypoint | command | index | | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | Then I get 200 as response code - And I get "OK" as response phrase - And I get the following entity as response body: - | method | url_pattern | entrypoint | command | index | id | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | + And I get "OK" as response phrase + And I get the following entity as response body: + | method | url_pattern | entrypoint | command | index | id | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | Index | id | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | - | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | Index | id | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | + | GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * | diff --git a/spec/test/features/control/list/success.feature b/spec/test/features/control/list/success.feature index c946ec4..ed669e8 100644 --- a/spec/test/features/control/list/success.feature +++ b/spec/test/features/control/list/success.feature @@ -1,5 +1,4 @@ Feature: Listing routes in a Kapow! server - Listing routes allow users to know what commands are available on a Kapow! server. The List endpoint returns a list of the routes the server has configured. @@ -11,8 +10,8 @@ Feature: Listing routes in a Kapow! server Given I have a just started Kapow! server When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get an empty list + And I get "OK" as response phrase + And I get an empty list Scenario: Listing routes on a server with routes loaded. After some route creation/insertion operations the server @@ -24,8 +23,8 @@ Feature: Listing routes in a Kapow! server | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | When I request a routes listing Then I get 200 as response code - And I get "OK" as response phrase - And I get a list with the following elements: - | method | url_pattern | entrypoint | command | index | id | - | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | - | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * | + And I get "OK" as response phrase + And I get a list with the following elements: + | method | url_pattern | entrypoint | command | index | id | + | GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * | + | GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * |