Modified some steps in data/handler features and added data/handler/error_itemnotfound feature

This commit is contained in:
Héctor Hurtado
2019-08-29 14:14:04 +02:00
parent fe0de6fc1b
commit 48ab14d49d
6 changed files with 72 additions and 41 deletions
@@ -1,16 +1,16 @@
@wip
Feature: Fail to retrieve an invalid resource for a handler in Kapow! server.
If trying to access an invalid resource for a handler
then the server responds with an error.
Feature: Fail to retrieve invalid resources from a handler in Kapow! server.
If trying to access an invalid resource from
a handler then the server responds with an
error.
Scenario: Try to get invented/path from a existent handler.
A request for retrieving an invalid resource for an
existent handler will trigger a invalid resource error.
Scenario: Try to get an inexistent resource from a handler.
A request to retrieve an invalid resource
from a handler will trigger a invalid resource error.
Given I have a Kapow! server with the following routes:
| method | url_pattern | entrypoint | command |
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
When I send a request to the route "/listRootDir"
And I get the resource "request/path" for the current request handler
Given I have a Kapow! server with the following testing routes:
| method | url_pattern |
| GET | /listRootDir |
When I send a request to the testing route "/listRootDir"
And I get the resource "invented/path"
Then I get 400 as response code
And I get "Invalid Resource Path" as response reason phrase