Closes: #66
This commit is contained in:
@@ -28,4 +28,4 @@ Feature: Kapow! server reject append requests with malformed JSON bodies.
|
|||||||
Hi! I am an invalid JSON document.
|
Hi! I am an invalid JSON document.
|
||||||
"""
|
"""
|
||||||
Then I get 400 as response code
|
Then I get 400 as response code
|
||||||
And I get "Malformed JSON" as response reason phrase
|
# And I get "Malformed JSON" as response reason phrase
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Feature: Kapow! server rejects requests with semantic errors.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route" as response reason phrase
|
# And I get "Invalid Route" as response reason phrase
|
||||||
|
|
||||||
Scenario: Error because bad route format.
|
Scenario: Error because bad route format.
|
||||||
If a request contains an invalid expression in the
|
If a request contains an invalid expression in the
|
||||||
@@ -48,4 +48,4 @@ Feature: Kapow! server rejects requests with semantic errors.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route" as response reason phrase
|
# And I get "Invalid Route" as response reason phrase
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Feature: Append new routes in Kapow! server.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 201 as response code
|
Then I get 201 as response code
|
||||||
And I get "Created" as response reason phrase
|
# And I get "Created" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -64,7 +64,7 @@ Feature: Append new routes in Kapow! server.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 201 as response code
|
Then I get 201 as response code
|
||||||
And I get "Created" as response reason phrase
|
# And I get "Created" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ Feature: Fail to delete a route in Kapow! server.
|
|||||||
Given I have a just started Kapow! server
|
Given I have a just started Kapow! server
|
||||||
When I delete the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
When I delete the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Not Found" as response reason phrase
|
# And I get "Not Found" as response reason phrase
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ Feature: Delete routes in Kapow! server.
|
|||||||
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body |
|
||||||
When I delete the first route
|
When I delete the first route
|
||||||
Then I get 204 as response code
|
Then I get 204 as response code
|
||||||
And I get "No Content" as response reason phrase
|
# And I get "No Content" as response reason phrase
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ Feature: Fail to retrieve route details in Kapow! server.
|
|||||||
Given I have a just started Kapow! server
|
Given I have a just started Kapow! server
|
||||||
When I get the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
When I get the route with id "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Not Found" as response reason phrase
|
# And I get "Not Found" as response reason phrase
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Feature: Retrieve route details in Kapow! server.
|
|||||||
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body |
|
||||||
When I get the first route
|
When I get the first route
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,4 +36,4 @@ Feature: Kapow! server rejects insertion requests 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 reason phrase
|
# And I get "Malformed JSON" as response reason phrase
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Feature: Kapow! server rejects insertion requests with semantic errors.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route" as response reason phrase
|
# And I get "Invalid Route" as response reason phrase
|
||||||
|
|
||||||
Scenario: Error because wrong route specification.
|
Scenario: Error because wrong route specification.
|
||||||
If a request contains an invalid expression in the
|
If a request contains an invalid expression in the
|
||||||
@@ -48,7 +48,7 @@ Feature: Kapow! server rejects insertion requests with semantic errors.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route" as response reason phrase
|
# And I get "Invalid Route" as response reason phrase
|
||||||
|
|
||||||
Scenario: Error because negative index specified.
|
Scenario: Error because negative index specified.
|
||||||
If a request contains a negative number in the
|
If a request contains a negative number in the
|
||||||
@@ -66,4 +66,4 @@ Feature: Kapow! server rejects insertion requests with semantic errors.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 422 as response code
|
Then I get 422 as response code
|
||||||
And I get "Invalid Route" as response reason phrase
|
# And I get "Invalid Route" as response reason phrase
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 201 as response code
|
Then I get 201 as response code
|
||||||
And I get "Created" as response reason phrase
|
# And I get "Created" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Then I get 201 as response code
|
Then I get 201 as response code
|
||||||
And I get "Created" as response reason phrase
|
# And I get "Created" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ 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 reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
[]
|
[]
|
||||||
@@ -41,7 +41,7 @@ Feature: Listing routes in a Kapow! server.
|
|||||||
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /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 reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response body:
|
And I get the following response body:
|
||||||
"""
|
"""
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Feature: Fail to retrieve resources from nonexistent handler in Kapow! server.
|
|||||||
Given I have a running Kapow! server
|
Given I have a running Kapow! server
|
||||||
When I get the resource "/request/path" for the handler with id "XXXXXXXXXX"
|
When I get the resource "/request/path" for the handler with id "XXXXXXXXXX"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Handler ID Not Found" as response reason phrase
|
# And I get "Handler ID Not Found" as response reason phrase
|
||||||
|
|
||||||
Scenario: Try to get an invalid resource from a nonexistent handler.
|
Scenario: Try to get an invalid resource from a nonexistent handler.
|
||||||
A request to retrieve an invalid resource
|
A request to retrieve an invalid resource
|
||||||
@@ -36,4 +36,4 @@ Feature: Fail to retrieve resources from nonexistent handler in Kapow! server.
|
|||||||
Given I have a running Kapow! server
|
Given I have a running Kapow! server
|
||||||
When I get the resource "/invalid/path" for the handler with id "XXXXXXXXXX"
|
When I get the resource "/invalid/path" for the handler with id "XXXXXXXXXX"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Handler ID Not Found" as response reason phrase
|
# And I get "Handler ID Not Found" as response reason phrase
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ Feature: Fail to retrieve an invalid resource for a handler in Kapow! server.
|
|||||||
When I send a request to the testing route "/foo"
|
When I send a request to the testing route "/foo"
|
||||||
And I get the resource "/invented/path"
|
And I get the resource "/invented/path"
|
||||||
Then I get 400 as response code
|
Then I get 400 as response code
|
||||||
And I get "Invalid Resource Path" as response reason phrase
|
# And I get "Invalid Resource Path" as response reason phrase
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ Feature: Fail to retrieve nonexistent resource items in Kapow! server.
|
|||||||
When I send a request to the testing route "/foo"
|
When I send a request to the testing route "/foo"
|
||||||
And I get the resource "/request/params/meloinvento"
|
And I get the resource "/request/params/meloinvento"
|
||||||
Then I get 404 as response code
|
Then I get 404 as response code
|
||||||
And I get "Resource Item Not Found" as response reason phrase
|
# And I get "Resource Item Not Found" as response reason phrase
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Feature: Retrieve a resource from a handler in Kapow! server.
|
|||||||
When I send a request to the testing route "/foo"
|
When I send a request to the testing route "/foo"
|
||||||
And I get the resource "/request/path"
|
And I get the resource "/request/path"
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response raw body:
|
And I get the following response raw body:
|
||||||
"""
|
"""
|
||||||
/foo
|
/foo
|
||||||
@@ -44,7 +44,7 @@ Feature: Retrieve a resource from a handler in Kapow! server.
|
|||||||
When I send a request to the testing route "/foo"
|
When I send a request to the testing route "/foo"
|
||||||
And I get the resource "/request/headers/Host"
|
And I get the resource "/request/headers/Host"
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response raw body:
|
And I get the following response raw body:
|
||||||
"""
|
"""
|
||||||
localhost:8080
|
localhost:8080
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Feature: Retrieve request resources from a handler in Kapow! server.
|
|||||||
| body | | bodyVal1 |
|
| body | | bodyVal1 |
|
||||||
And I get the resource "<resourcePath>"
|
And I get the resource "<resourcePath>"
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the following response raw body:
|
And I get the following response raw body:
|
||||||
"""
|
"""
|
||||||
<value>
|
<value>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ Feature: Setting values for handler response resources in Kapow! server.
|
|||||||
And I set the resource "<resourcePath>" with value "<value>"
|
And I set the resource "<resourcePath>" with value "<value>"
|
||||||
And I release the testing request
|
And I release the testing request
|
||||||
Then I get 200 as response code
|
Then I get 200 as response code
|
||||||
And I get "OK" as response reason phrase
|
# And I get "OK" as response reason phrase
|
||||||
And I get the value "<value>" for the response "<fieldType>" named "<elementName>" in the testing request
|
And I get the value "<value>" for the response "<fieldType>" named "<elementName>" in the testing request
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|||||||
Reference in New Issue
Block a user