Implement get route details. Closes #12

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-08-23 15:18:25 +02:00
parent 2b35a1fbfe
commit 6b0ff05010
4 changed files with 51 additions and 17 deletions
@@ -1,12 +1,12 @@
Feature: Fail to retrieve a route info in Kapow! server.
When trying to get a route info in the server, if it
does no exists the server respons with an error.
Feature: Fail to retrieve route details in Kapow! server.
When trying to get route details for a route that
does no exist the server responds with an error.
Scenario: Try to get info for a non-existing route.
A request of retrieving a non-existing route info
will trigger a not found error.
Scenario: Try to get details for a nonexistent route.
A request for retrieving details for a nonexistent
route will trigger a not found error.
Given I have a just started Kapow! server
When I get the info for 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
And I get "Not Found" as response reason phrase
@@ -1,15 +1,15 @@
Feature: Retrieve route info in Kapow! server.
Users can retrieve route info from the server by
specifying its id.
Feature: Retrieve route details in Kapow! server.
Users can retrieve route details from the server
by specifying its id.
Scenario: Retrieve route info.
Get route info by spscifying its id.
Scenario: Retrieve route details.
Get route details by id.
Given I have a Kapow! server whith the following routes:
Given I have a Kapow! server with the following routes:
| method | url_pattern | entrypoint | command |
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
When I get the first route info
When I get the first route
Then I get 200 as response code
And I get "OK" as response reason phrase
And I get the following response body: