Fixed some formating and naming issues
This commit is contained in:
@@ -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
|
Kapow! server will reject to append a route when
|
||||||
it receives a malformed json document in the
|
it receives a malformed json document in the
|
||||||
request body.
|
request body.
|
||||||
@@ -20,5 +20,5 @@ Feature: Kapow! server reject responses with malformed JSON bodies.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 400 as response code
|
Then I get 400 as response code
|
||||||
And I get "Malformed JSON" as response phrase
|
And I get "Malformed JSON" as response phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
|
|||||||
@@ -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
|
When deleting routes the server will mantain the
|
||||||
remaining routes ordered an with consecutive indexes.
|
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 |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
|
|
||||||
Scenario: Removing the first routes.
|
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 maintain their relative order and their indexes
|
||||||
will be decreased by one.
|
will be decreased by one.
|
||||||
|
|
||||||
When I delete the first route inserted
|
When I delete the first route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
||||||
| GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * |
|
| 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 | * |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * |
|
||||||
|
|
||||||
Scenario: Removing the last routes.
|
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.
|
maintain their relative order and indexes.
|
||||||
|
|
||||||
When I delete the last route inserted
|
When I delete the last route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * |
|
||||||
| GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 2 | * |
|
| GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 2 | * |
|
||||||
|
|
||||||
Scenario: Removing a midst route.
|
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
|
maintain their relative order and the indexes of the
|
||||||
following routes will be decreased by one.
|
following routes will be decreased by one.
|
||||||
|
|
||||||
When I delete the second route inserted
|
When I delete the second route inserted
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
||||||
| GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body | 1 | * |
|
| 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 | * |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * |
|
||||||
|
|||||||
@@ -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
|
Kapow! server will reject to insert a route when
|
||||||
it receives a malformed json document in the
|
it receives a malformed json document in the
|
||||||
request body.
|
request body.
|
||||||
@@ -21,5 +21,5 @@ Feature: Kapow! server reject responses with malformed JSON bodies.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get bad request as response code
|
Then I get bad request as response code
|
||||||
And I get "Malformed JSON" as response phrase
|
And I get "Malformed JSON" as response phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ Feature: Kapow! server reject insert responses with semantic errors.
|
|||||||
| entrypoint | command |
|
| entrypoint | command |
|
||||||
| /bin/sh -c | ls -la / \| response /body |
|
| /bin/sh -c | ls -la / \| response /body |
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Missing Mandatory Field" as response reason phrase
|
And I get "Missing Mandatory Field" as response reason phrase
|
||||||
And I get the following entity as response body:
|
And I get the following entity as response body:
|
||||||
| missing_mandatory_fields |
|
| missing_mandatory_fields |
|
||||||
| "url_pattern", "method" |
|
| "url_pattern", "method" |
|
||||||
|
|
||||||
Scenario: Error because of wrong route specification.
|
Scenario: Error because of wrong route specification.
|
||||||
If a request contains an invalid expression in the
|
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 |
|
| method | url_pattern | entrypoint | command | index |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
|
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route Spec" as response reason phrase
|
And I get "Invalid Route Spec" as response reason phrase
|
||||||
And I get an empty response body
|
And I get an empty response body
|
||||||
|
|
||||||
Scenario: Error because of wrong method value.
|
Scenario: Error because of wrong method value.
|
||||||
If a request contains an invalid value in the
|
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 |
|
| method | url_pattern | entrypoint | command | index |
|
||||||
| AVECES | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
|
| AVECES | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Data Type" as response reason phrase
|
And I get "Invalid Data Type" as response reason phrase
|
||||||
And I get an empty response body
|
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
|
When inserting routes the server will mantain the
|
||||||
whole set of routes ordered an with consecutive indexes.
|
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 |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
|
|
||||||
Scenario: Inserting before the first route.
|
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 maintain their relative order and their indexes
|
||||||
will be increased by one.
|
will be increased by one.
|
||||||
|
|
||||||
@@ -18,42 +18,42 @@ Feature: Routes auto-ordering in a Kapow! server.
|
|||||||
| method | url_pattern | entrypoint | command | index |
|
| method | url_pattern | entrypoint | command | index |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 |
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get the following entity as response body:
|
And I get the following entity as response body:
|
||||||
| method | url_pattern | entrypoint | command | index | id |
|
| method | url_pattern | entrypoint | command | index | id |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 0 | * |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 1 | * |
|
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 1 | * |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * |
|
||||||
|
|
||||||
Scenario: Inserting after the last routes.
|
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.
|
will maintain their relative order and indexes.
|
||||||
|
|
||||||
When I insert the route:
|
When I insert the route:
|
||||||
| method | url_pattern | entrypoint | command | index |
|
| method | url_pattern | entrypoint | command | index |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 |
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get the following entity as response body:
|
And I get the following entity as response body:
|
||||||
| method | url_pattern | entrypoint | command | index | id |
|
| method | url_pattern | entrypoint | command | index | id |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * |
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
| 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 | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 2 | * |
|
||||||
|
|
||||||
Scenario: Inserting a midst route.
|
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
|
will maintain their relative order and the indexes
|
||||||
of thefollowing routes will be increased by one.
|
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 |
|
| method | url_pattern | entrypoint | command | index |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 |
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get the following entity as response body:
|
And I get the following entity as response body:
|
||||||
| method | url_pattern | entrypoint | command | index | id |
|
| method | url_pattern | entrypoint | command | index | id |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * |
|
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * |
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | Index | id |
|
| method | url_pattern | entrypoint | command | Index | id |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body | 1 | * |
|
| 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 | * |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 2 | * |
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Feature: Listing routes in a Kapow! server
|
Feature: Listing routes in a Kapow! server
|
||||||
|
|
||||||
Listing routes allow users to know what commands are
|
Listing routes allow users to know what commands are
|
||||||
available on a Kapow! server. The List endpoint returns
|
available on a Kapow! server. The List endpoint returns
|
||||||
a list of the routes the server has configured.
|
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
|
Given I have a just started Kapow! server
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get an empty list
|
And I get an empty list
|
||||||
|
|
||||||
Scenario: Listing routes on a server with routes loaded.
|
Scenario: Listing routes on a server with routes loaded.
|
||||||
After some route creation/insertion operations the server
|
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 |
|
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
When I request a routes listing
|
When I request a routes listing
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response phrase
|
And I get "OK" as response phrase
|
||||||
And I get a list with the following elements:
|
And I get a list with the following elements:
|
||||||
| method | url_pattern | entrypoint | command | index | id |
|
| method | url_pattern | entrypoint | command | index | id |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 | * |
|
| 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 | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | 1 | * |
|
||||||
|
|||||||
Reference in New Issue
Block a user