summaryrefslogtreecommitdiff
path: root/src/hub/test-client
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-05-06 05:01:48 +0200
committerChristian Pointner <equinox@spreadspace.org>2017-05-06 05:01:48 +0200
commitf9ac8f4a7673f186c092a5d02bcca9730ea9a2dc (patch)
tree546259b52a863b1a08d5fc1e5cd790421d0f976d /src/hub/test-client
parentparse 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-xsrc/hub/test-client28
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'