Fixed some formating and naming issues

This commit is contained in:
Héctor Hurtado
2019-08-20 10:51:24 +02:00
parent 2b31b2b9f0
commit b86454179a
6 changed files with 84 additions and 84 deletions
@@ -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
@@ -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
@@ -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 | * |