Modify Gherkin-lint example indentation value. Added features for data/request/success and data/response/success
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
"then": 4,
|
"then": 4,
|
||||||
"and": 6,
|
"and": 6,
|
||||||
"but": 6,
|
"but": 6,
|
||||||
"example": 2,
|
"example": 6,
|
||||||
"Examples": 4,
|
"Examples": 4,
|
||||||
"scenario tag": 2}
|
"scenario tag": 2}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
Feature: Retrieve request resources from a handler in Kapow! server.
|
||||||
|
Users can retrieve request handler resources
|
||||||
|
from the server by specifying the handler id
|
||||||
|
and the resource path.
|
||||||
|
|
||||||
|
Scenario Outline: Retrieve all defined resources for the current request.
|
||||||
|
Get the following resources for the current
|
||||||
|
request through the current handler.
|
||||||
|
|
||||||
|
Given I have a Kapow! server with the following routes:
|
||||||
|
| method | url_pattern | entrypoint | command |
|
||||||
|
| GET | /listRootDir/{path} | /bin/sh -c | ls -la / \| response /body |
|
||||||
|
|
||||||
|
When I send a request to the route "/listRootDir/otro" setting this values:
|
||||||
|
| type | name | value |
|
||||||
|
| parameter | "par1" | "paramVal1" |
|
||||||
|
| header | "head1" | "headVal1" |
|
||||||
|
| cookie | "cook1" | "cookieVal1" |
|
||||||
|
|
||||||
|
And I get the resource <resourcePath> for the current request handler
|
||||||
|
Then I get 200 as response code
|
||||||
|
And I get "OK" as response reason phrase
|
||||||
|
And I get the following response body <value>
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| resourcePath | value |
|
||||||
|
| resource/method | "GET" |
|
||||||
|
| resource/path | "/listRootDir/otro" |
|
||||||
|
| resource/host | "localhost:8080" |
|
||||||
|
| resource/matches/path | "otro" |
|
||||||
|
| resource/params/par1 | "paramVal1" |
|
||||||
|
| resource/headers/head1 | "headVal1" |
|
||||||
|
| resource/cookies/cook1 | "cookieVal1" |
|
||||||
|
| resource/body | empty |
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
Feature: Setting response values for handler resources in Kapow! server.
|
||||||
|
Users can set the values in the response
|
||||||
|
resources by specifying the handler id
|
||||||
|
and the resource path.
|
||||||
|
|
||||||
|
Scenario: Set status code for the current response.
|
||||||
|
Set the status code for the current
|
||||||
|
response through the current handler.
|
||||||
|
|
||||||
|
Given I have a Kapow! server with the following routes:
|
||||||
|
| method | url_pattern | entrypoint | command |
|
||||||
|
| GET | /listRootDir | /bin/sh -c | echo 666 \| response /status |
|
||||||
|
When I send a request to the route "/listRootDir"
|
||||||
|
Then I get 666 as response code
|
||||||
|
And I get "OK" as response reason phrase
|
||||||
|
|
||||||
|
Scenario Outline: Set all defined resources for the current response.
|
||||||
|
Set the following resources for the current
|
||||||
|
response through the current handler.
|
||||||
|
|
||||||
|
Given I have a Kapow! server with the following routes:
|
||||||
|
| method | url_pattern | entrypoint | command |
|
||||||
|
| GET | /listRootDir | /bin/sh -c | echo <value> \| response <resourcePath> |
|
||||||
|
When I send a request to the route "/listRootDir"
|
||||||
|
Then I get 200 as response code
|
||||||
|
And I get "OK" as response reason phrase
|
||||||
|
And I get the value <value> for the response <type> named <elementName>
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| resourcePath | value | type | elementName |
|
||||||
|
| /headers/head1 | "headVal1" | header | "head1" |
|
||||||
|
| /cookies/cook1 | "cookVal1" | cookie | "cook1" |
|
||||||
|
| /body | "bodyValue1" | body | "" |
|
||||||
|
| /stream | "bodyValue2" | body | "" |
|
||||||
Reference in New Issue
Block a user