diff options
Diffstat (limited to 'src/hub/test-client')
-rwxr-xr-x | src/hub/test-client | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/hub/test-client b/src/hub/test-client index 8a24c7d..fcb9a98 100755 --- a/src/hub/test-client +++ b/src/hub/test-client @@ -1,23 +1,22 @@ #!/bin/sh + +TEST_D="./test" + echo pipe: import sample.json echo ------------------------ -socat file:../../dat/sample.json,rdonly unix-client:/run/sfive/pipe +socat file:../../dat/sample.json,rdonly "unix-client:$TEST_D/pipe" echo pipe-gram: import sample-gram.json echo ---------------------------------- -while read x; do echo "$x" | socat stdio unix-sendto:/run/sfive/pipegram; done < ../../dat/sample-gram.json +while read x; do echo "$x" | socat stdio "unix-sendto:$TEST_D/pipegram"; done < ../../dat/sample-gram.json + +echo post update +echo ----------- +curl -i --data @../../dat/sample-post.json 'http://localhost:8000/updates' echo show query result echo ----------------- -curl -i 'http://localhost:8000/updates?from=2013-10-21T00:00:00Z&to=2013-10-21T12:31:00Z' +curl -i 'http://localhost:8000/updates' -echo '\npost update' -echo ------------ -curl -i --data @../../dat/sample-post.json 'http://localhost:8000/updates' - -echo show stats -echo ---------- -curl -i 'http://localhost:8000/stats' echo '\n\ndone' - |