Change URL examples by metasyntactic variable names (RFC3092)
This commit is contained in:
@@ -12,7 +12,7 @@ Feature: Append new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body"
|
"command": "ls -la / | response /body"
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@ Feature: Append new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -37,13 +37,13 @@ Feature: Append new routes in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
When I append the route:
|
When I append the route:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listEtcDir",
|
"url_pattern": "/baz",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /etc | response /body"
|
"command": "ls -la /etc | response /body"
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ Feature: Append new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listEtcDir",
|
"url_pattern": "/baz",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /etc | response /body",
|
"command": "ls -la /etc | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
Background:
|
Background:
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listVarDir | /bin/sh -c | ls -la /var \| response /body |
|
| GET | /bar | /bin/sh -c | ls -la /var \| response /body |
|
||||||
| GET | /listEtcDir | /bin/sh -c | ls -la /etc \| response /body |
|
| GET | /baz | /bin/sh -c | ls -la /etc \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
|
|
||||||
Scenario: Removing the first route.
|
Scenario: Removing the first route.
|
||||||
After removing the first route the remaining ones
|
After removing the first route the remaining ones
|
||||||
@@ -22,7 +22,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -30,7 +30,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listEtcDir",
|
"url_pattern": "/baz",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /etc | response /body",
|
"command": "ls -la /etc | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -38,7 +38,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
@@ -58,7 +58,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -66,7 +66,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -74,7 +74,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listEtcDir",
|
"url_pattern": "/baz",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /etc | response /body",
|
"command": "ls -la /etc | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
@@ -95,7 +95,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -103,7 +103,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listEtcDir",
|
"url_pattern": "/baz",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /etc | response /body",
|
"command": "ls -la /etc | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -111,7 +111,7 @@ Feature: Consistent route order after a route deletion in Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ Feature: Delete routes in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| 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
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ Feature: Retrieve route details in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| 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
|
||||||
@@ -16,7 +16,7 @@ Feature: Retrieve route details in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
Background:
|
Background:
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
|
|
||||||
Scenario: Inserting before the first route.
|
Scenario: Inserting before the first route.
|
||||||
After inserting before the first route the previous set
|
After inserting before the first route the previous set
|
||||||
@@ -17,7 +17,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 0
|
"index": 0
|
||||||
@@ -29,7 +29,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -37,7 +37,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -45,7 +45,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
@@ -62,7 +62,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 2
|
"index": 2
|
||||||
@@ -74,7 +74,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -82,7 +82,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -90,7 +90,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
@@ -108,7 +108,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 1
|
"index": 1
|
||||||
@@ -120,7 +120,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -128,7 +128,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
@@ -136,7 +136,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
Background:
|
Background:
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||||
|
|
||||||
Scenario: Insert a route at the beginning.
|
Scenario: Insert a route at the beginning.
|
||||||
A route can be inserted at the beginning of the list
|
A route can be inserted at the beginning of the list
|
||||||
@@ -17,7 +17,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 0
|
"index": 0
|
||||||
@@ -29,7 +29,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -46,7 +46,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 1
|
"index": 1
|
||||||
@@ -58,7 +58,7 @@ Feature: Insert new routes in Kapow! server.
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listVarDir",
|
"url_pattern": "/bar",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /var | response /body",
|
"command": "ls -la /var | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ Feature: Listing routes in a Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following routes:
|
Given I have a Kapow! server with the following routes:
|
||||||
| method | url_pattern | entrypoint | command |
|
| method | url_pattern | entrypoint | command |
|
||||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
| GET | /foo | /bin/sh -c | ls -la / \| response /body |
|
||||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
| GET | /qux/{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 reason phrase
|
And I get "OK" as response reason phrase
|
||||||
@@ -32,7 +32,7 @@ Feature: Listing routes in a Kapow! server.
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listRootDir",
|
"url_pattern": "/foo",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la / | response /body",
|
"command": "ls -la / | response /body",
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -40,7 +40,7 @@ Feature: Listing routes in a Kapow! server.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"url_pattern": "/listDir/{dirname}",
|
"url_pattern": "/qux/{dirname}",
|
||||||
"entrypoint": "/bin/sh -c",
|
"entrypoint": "/bin/sh -c",
|
||||||
"command": "ls -la /request/params/dirname | response /body",
|
"command": "ls -la /request/params/dirname | response /body",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ Feature: Fail to retrieve an invalid resource for a handler in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
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
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ Feature: Fail to retrieve nonexistent resource items in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
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 204 as response code
|
Then I get 204 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
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Feature: Retrieve a resource from a handler in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
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:
|
||||||
"""
|
"""
|
||||||
/listRootDir
|
/foo
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Scenario: Retrieve a resource item.
|
Scenario: Retrieve a resource item.
|
||||||
@@ -25,8 +25,8 @@ Feature: Retrieve a resource from a handler in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
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
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ Feature: Retrieve request resources from a handler in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir/{path} |
|
| GET | /foo/{path} |
|
||||||
When I send a request to the testing route "/listRootDir/matchVal1" adding:
|
When I send a request to the testing route "/foo/matchVal1" adding:
|
||||||
| fieldType | name | value |
|
| fieldType | name | value |
|
||||||
| parameter | par1 | paramVal1 |
|
| parameter | par1 | paramVal1 |
|
||||||
| header | head1 | headVal1 |
|
| header | head1 | headVal1 |
|
||||||
@@ -28,7 +28,7 @@ Feature: Retrieve request resources from a handler in Kapow! server.
|
|||||||
Examples:
|
Examples:
|
||||||
| resourcePath | value |
|
| resourcePath | value |
|
||||||
| /request/method | GET |
|
| /request/method | GET |
|
||||||
| /request/path | /listRootDir/matchVal1 |
|
| /request/path | /foo/matchVal1 |
|
||||||
| /request/host | localhost:8080 |
|
| /request/host | localhost:8080 |
|
||||||
| /request/matches/path | matchVal1 |
|
| /request/matches/path | matchVal1 |
|
||||||
| /request/params/par1 | paramVal1 |
|
| /request/params/par1 | paramVal1 |
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ Feature: Setting values for handler response resources in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
When I send a request to the testing route "/foo"
|
||||||
And I set the resource "/response/status" with value "418"
|
And I set the resource "/response/status" with value "418"
|
||||||
And I release the testing request
|
And I release the testing request
|
||||||
Then I get 418 as response code in the testing request
|
Then I get 418 as response code in the testing request
|
||||||
@@ -21,8 +21,8 @@ Feature: Setting values for handler response resources in Kapow! server.
|
|||||||
|
|
||||||
Given I have a Kapow! server with the following testing routes:
|
Given I have a Kapow! server with the following testing routes:
|
||||||
| method | url_pattern |
|
| method | url_pattern |
|
||||||
| GET | /listRootDir |
|
| GET | /foo |
|
||||||
When I send a request to the testing route "/listRootDir"
|
When I send a request to the testing route "/foo"
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user