From 58a800e5e960829b03e584c1fe9bc00b18a40b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Thu, 5 Sep 2019 08:40:59 +0200 Subject: [PATCH] Replace request/response with new commands --- doc/readme.rst | 8 +++--- poc/setup.cfg | 2 -- spec/README.md | 28 +++++++++---------- .../append/error_unprocessable.feature | 4 +-- .../features/control/append/success.feature | 12 ++++---- .../control/delete/list_order.feature | 26 ++++++++--------- .../features/control/delete/success.feature | 4 +-- .../test/features/control/get/success.feature | 6 ++-- .../control/insert/error_malformed.feature | 2 +- .../insert/error_unprocessable.feature | 6 ++-- .../control/insert/list_order.feature | 28 +++++++++---------- .../features/control/insert/success.feature | 12 ++++---- .../features/control/list/success.feature | 8 +++--- 13 files changed, 72 insertions(+), 74 deletions(-) diff --git a/doc/readme.rst b/doc/readme.rst index 0835521..15a761e 100644 --- a/doc/readme.rst +++ b/doc/readme.rst @@ -34,7 +34,7 @@ that contains: .. code-block:: bash kapow route add /backups \ - -c 'cloudx storage ls /backups | grep $(request /params/query) | response /body' + -c 'cloudx storage ls /backups | grep $(kapow get /request/params/query) | kapow set /response/body' and execute it in the host with the command: @@ -53,7 +53,7 @@ First you must create a pow file named ``hello.pow`` with the following contents .. code-block:: bash - kapow route add /greet -c "echo 'hello world' | response /body" + kapow route add /greet -c "echo 'hello world' | kapow set /response/body" then, you must execute: @@ -75,7 +75,7 @@ First you must create a pow file named ``echo.pow`` with the following contents: .. code-block:: bash - kapow route add -X POST /echo -c 'request /body | response /body' + kapow route add -X POST /echo -c 'kapow get /request/body | kapow set /response/body' then, you must execute: @@ -108,7 +108,7 @@ Let's write a ``multiline.pow`` file with the following content: kapow route add /log_and_love - <<- 'EOF' echo "[$(date)] and stuff" >> stuff.log - echo love | response /body + echo love | kapow set /response/body EOF and then we serve it with ``kapow``: diff --git a/poc/setup.cfg b/poc/setup.cfg index bc2f52f..2740a1b 100644 --- a/poc/setup.cfg +++ b/poc/setup.cfg @@ -10,8 +10,6 @@ zip_safe = True include_package_data = True scripts = bin/kapow - bin/request - bin/response bin/static install_requires = aiohttp==3.5.4 diff --git a/spec/README.md b/spec/README.md index dcaa4f9..4883b90 100644 --- a/spec/README.md +++ b/spec/README.md @@ -159,7 +159,7 @@ Content-Length: 189 "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } @@ -194,7 +194,7 @@ field must be a json scaped string. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" }, @@ -202,7 +202,7 @@ field must be a json scaped string. "method": "POST", "url_pattern": "/bye", "entrypoint": null, - "command": "echo Bye World | response /body", + "command": "echo Bye World | kapow set /response/body", "index": 1, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } @@ -227,7 +227,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body" + "command": "echo Hello World | kapow set /response/body" } ``` * **Success Responses**: @@ -239,7 +239,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } @@ -254,7 +254,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body" + "command": "echo Hello World | kapow set /response/body" } EOF ``` @@ -280,7 +280,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", } ``` * **Success Responses**: @@ -292,7 +292,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } @@ -307,7 +307,7 @@ A new id is created for the appended route so it can be referenced later. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0 } EOF @@ -354,7 +354,7 @@ Retrieves the information about the route identified by `{id}`. "method": "GET", "url_pattern": "/hello", "entrypoint": null, - "command": "echo Hello World | response /body", + "command": "echo Hello World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } @@ -673,7 +673,7 @@ Options: #### Example ```sh -kapow route add -X GET '/list/{ip}' -c 'nmap -sL $(request /matches/ip) | response /body' +kapow route add -X GET '/list/{ip}' -c 'nmap -sL $(kapow get /request/matches/ip) | kapow set /response/body' ``` ### `request` @@ -689,7 +689,7 @@ Exposes the requests' resources. #### Example ```sh # Access the body of the request -request /body +kapow get /request/body ``` @@ -706,14 +706,14 @@ Exposes the response's resources. #### Example ```sh # Write to the body of the response -echo 'Hello, World!' | response /body +echo 'Hello, World!' | kapow set /response/body ``` ## An End-to-End Example ```sh $ cat nmap.kpow -kapow route add -X GET '/list/{ip}' -c 'nmap -sL $(request /matches/ip) | response /body' +kapow route add -X GET '/list/{ip}' -c 'nmap -sL $(kapow get /request/matches/ip) | kapow set /response/body' ``` ```sh $ kapow ./nmap.kapow diff --git a/spec/test/features/control/append/error_unprocessable.feature b/spec/test/features/control/append/error_unprocessable.feature index 29eb180..128ece7 100644 --- a/spec/test/features/control/append/error_unprocessable.feature +++ b/spec/test/features/control/append/error_unprocessable.feature @@ -12,7 +12,7 @@ Feature: Kapow! server rejects requests with semantic errors. """ { "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body" + "command": "ls -la / | kapow set /response/body" } """ Then I get 422 as response code @@ -29,7 +29,7 @@ Feature: Kapow! server rejects requests with semantic errors. "method": "GET", "url_pattern": "+123--", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body" + "command": "ls -la / | kapow set /response/body" } """ Then I get 422 as response code diff --git a/spec/test/features/control/append/success.feature b/spec/test/features/control/append/success.feature index 2f419b7..0ab5581 100644 --- a/spec/test/features/control/append/success.feature +++ b/spec/test/features/control/append/success.feature @@ -14,7 +14,7 @@ Feature: Append new routes in Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body" + "command": "ls -la / | kapow set /response/body" } """ Then I get 201 as response code @@ -25,7 +25,7 @@ Feature: Append new routes in Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY } @@ -37,15 +37,15 @@ Feature: Append new routes in Kapow! server. Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| kapow set /response/body | + | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body | When I append the route: """ { "method": "GET", "url_pattern": "/baz", "entrypoint": "/bin/sh -c", - "command": "ls -la /etc | response /body" + "command": "ls -la /etc | kapow set /response/body" } """ Then I get 201 as response code @@ -56,7 +56,7 @@ Feature: Append new routes in Kapow! server. "method": "GET", "url_pattern": "/baz", "entrypoint": "/bin/sh -c", - "command": "ls -la /etc | response /body", + "command": "ls -la /etc | kapow set /response/body", "index": 2, "id": ANY } diff --git a/spec/test/features/control/delete/list_order.feature b/spec/test/features/control/delete/list_order.feature index f6296c4..c2f0531 100644 --- a/spec/test/features/control/delete/list_order.feature +++ b/spec/test/features/control/delete/list_order.feature @@ -5,10 +5,10 @@ Feature: Consistent route order after a route deletion in Kapow! server. Background: Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /bar | /bin/sh -c | ls -la /var \| response /body | - | GET | /baz | /bin/sh -c | ls -la /etc \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| kapow set /response/body | + | GET | /bar | /bin/sh -c | ls -la /var \| kapow set /response/body | + | GET | /baz | /bin/sh -c | ls -la /etc \| kapow set /response/body | + | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body | Scenario: Removing the first route. After removing the first route the remaining ones @@ -24,7 +24,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 0, "id": ANY }, @@ -32,7 +32,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/baz", "entrypoint": "/bin/sh -c", - "command": "ls -la /etc | response /body", + "command": "ls -la /etc | kapow set /response/body", "index": 1, "id": ANY }, @@ -40,7 +40,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 2, "id": ANY } @@ -60,7 +60,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY }, @@ -68,7 +68,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 1, "id": ANY }, @@ -76,7 +76,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/baz", "entrypoint": "/bin/sh -c", - "command": "ls -la /etc | response /body", + "command": "ls -la /etc | kapow set /response/body", "index": 2, "id": ANY } @@ -97,7 +97,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY }, @@ -105,7 +105,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/baz", "entrypoint": "/bin/sh -c", - "command": "ls -la /etc | response /body", + "command": "ls -la /etc | kapow set /response/body", "index": 1, "id": ANY }, @@ -113,7 +113,7 @@ Feature: Consistent route order after a route deletion in Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 2, "id": ANY } diff --git a/spec/test/features/control/delete/success.feature b/spec/test/features/control/delete/success.feature index 3aafacd..8b60dac 100644 --- a/spec/test/features/control/delete/success.feature +++ b/spec/test/features/control/delete/success.feature @@ -7,8 +7,8 @@ Feature: Delete routes in Kapow! server. Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| 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 Then I get 204 as response code And I get "No Content" as response reason phrase diff --git a/spec/test/features/control/get/success.feature b/spec/test/features/control/get/success.feature index c01f09f..e723fa5 100644 --- a/spec/test/features/control/get/success.feature +++ b/spec/test/features/control/get/success.feature @@ -7,8 +7,8 @@ Feature: Retrieve route details in Kapow! server. Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| 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 Then I get 200 as response code And I get "OK" as response reason phrase @@ -18,7 +18,7 @@ Feature: Retrieve route details in Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY } diff --git a/spec/test/features/control/insert/error_malformed.feature b/spec/test/features/control/insert/error_malformed.feature index 86e9461..74ea132 100644 --- a/spec/test/features/control/insert/error_malformed.feature +++ b/spec/test/features/control/insert/error_malformed.feature @@ -15,7 +15,7 @@ Feature: Kapow! server rejects insertion requests with malformed JSON bodies. "url_pattern": /hello, "entrypoint": null "command": "echo Hello - World | response /body", + World | kapow set /response/body", "index": 0, "id": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" } diff --git a/spec/test/features/control/insert/error_unprocessable.feature b/spec/test/features/control/insert/error_unprocessable.feature index 97e15c7..c90898d 100644 --- a/spec/test/features/control/insert/error_unprocessable.feature +++ b/spec/test/features/control/insert/error_unprocessable.feature @@ -11,7 +11,7 @@ Feature: Kapow! server rejects insertion requests with semantic errors. """ { "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body" + "command": "ls -la / | kapow set /response/body" } """ Then I get 422 as response code @@ -28,7 +28,7 @@ Feature: Kapow! server rejects insertion requests with semantic errors. "method": "GET", "url_pattern": "+123--", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0 } """ @@ -46,7 +46,7 @@ Feature: Kapow! server rejects insertion requests with semantic errors. "method": "GET", "url_pattern": "+123--", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": -1 } """ diff --git a/spec/test/features/control/insert/list_order.feature b/spec/test/features/control/insert/list_order.feature index 5e11303..5644736 100644 --- a/spec/test/features/control/insert/list_order.feature +++ b/spec/test/features/control/insert/list_order.feature @@ -5,8 +5,8 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. Background: Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| kapow set /response/body | + | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body | Scenario: Inserting before the first route. After inserting before the first route the previous set @@ -19,7 +19,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 0 } """ @@ -31,7 +31,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 0, "id": ANY }, @@ -39,7 +39,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 1, "id": ANY }, @@ -47,7 +47,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 2, "id": ANY } @@ -64,7 +64,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 2 } """ @@ -76,7 +76,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY }, @@ -84,7 +84,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 1, "id": ANY }, @@ -92,7 +92,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 2, "id": ANY } @@ -110,7 +110,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 1 } """ @@ -122,7 +122,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY }, @@ -130,7 +130,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 1, "id": ANY }, @@ -138,7 +138,7 @@ Feature: Consistent route ordering after inserting a route in a Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 2, "id": ANY } diff --git a/spec/test/features/control/insert/success.feature b/spec/test/features/control/insert/success.feature index 185308a..61ff11e 100644 --- a/spec/test/features/control/insert/success.feature +++ b/spec/test/features/control/insert/success.feature @@ -6,8 +6,8 @@ Feature: Insert new routes in Kapow! server. Background: Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| kapow set /response/body | + | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| kapow set /response/body | Scenario: Insert a route at the beginning. A route can be inserted at the beginning of the list @@ -19,7 +19,7 @@ Feature: Insert new routes in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 0 } """ @@ -31,7 +31,7 @@ Feature: Insert new routes in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 0, "id": ANY } @@ -48,7 +48,7 @@ Feature: Insert new routes in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 1 } """ @@ -60,7 +60,7 @@ Feature: Insert new routes in Kapow! server. "method": "GET", "url_pattern": "/bar", "entrypoint": "/bin/sh -c", - "command": "ls -la /var | response /body", + "command": "ls -la /var | kapow set /response/body", "index": 1, "id": ANY } diff --git a/spec/test/features/control/list/success.feature b/spec/test/features/control/list/success.feature index d3c3fd4..711435f 100644 --- a/spec/test/features/control/list/success.feature +++ b/spec/test/features/control/list/success.feature @@ -22,8 +22,8 @@ Feature: Listing routes in a Kapow! server. Given I have a Kapow! server with the following routes: | method | url_pattern | entrypoint | command | - | GET | /foo | /bin/sh -c | ls -la / \| response /body | - | GET | /qux/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body | + | GET | /foo | /bin/sh -c | ls -la / \| 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 Then I get 200 as response code And I get "OK" as response reason phrase @@ -34,7 +34,7 @@ Feature: Listing routes in a Kapow! server. "method": "GET", "url_pattern": "/foo", "entrypoint": "/bin/sh -c", - "command": "ls -la / | response /body", + "command": "ls -la / | kapow set /response/body", "index": 0, "id": ANY }, @@ -42,7 +42,7 @@ Feature: Listing routes in a Kapow! server. "method": "GET", "url_pattern": "/qux/{dirname}", "entrypoint": "/bin/sh -c", - "command": "ls -la /request/params/dirname | response /body", + "command": "ls -la /request/params/dirname | kapow set /response/body", "index": 1, "id": ANY }