diff options
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' |