diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-05-06 05:01:48 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-05-06 05:01:48 +0200 |
commit | f9ac8f4a7673f186c092a5d02bcca9730ea9a2dc (patch) | |
tree | 546259b52a863b1a08d5fc1e5cd790421d0f976d /src/hub/test-client | |
parent | parse from and limit from request query (diff) |
implemented bulk receiver for updates via web interfaces (not working yet)
Diffstat (limited to 'src/hub/test-client')
-rwxr-xr-x | src/hub/test-client | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/hub/test-client b/src/hub/test-client index fcb9a98..612e576 100755 --- a/src/hub/test-client +++ b/src/hub/test-client @@ -1,22 +1,30 @@ -#!/bin/sh +#!/bin/bash TEST_D="./test" -echo pipe: import sample.json -echo ------------------------ +echo "pipe: import sample.json" +echo "------------------------" socat file:../../dat/sample.json,rdonly "unix-client:$TEST_D/pipe" +echo "" -echo pipe-gram: import sample-gram.json -echo ---------------------------------- +echo "pipe-gram: import sample-gram.json" +echo "----------------------------------" while read x; do echo "$x" | socat stdio "unix-sendto:$TEST_D/pipegram"; done < ../../dat/sample-gram.json +echo "" -echo post update -echo ----------- +echo "post update" +echo "-----------" curl -i --data @../../dat/sample-post.json 'http://localhost:8000/updates' +echo -e "\n" -echo show query result -echo ----------------- -curl -i 'http://localhost:8000/updates' +echo "post update (bulk)" +echo "------------------" +curl -i --data @../../dat/sample-post-bulk.json 'http://localhost:8000/updates?bulk=1' +echo -e "\n" +echo "show query result" +echo "-----------------" +curl -i 'http://localhost:8000/updates' +echo "" echo '\n\ndone' |