summaryrefslogtreecommitdiff
path: root/src/hub/test-client
blob: 8a24c7da4ebb00c168bfc5aea8b220f213c5289b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
echo pipe: import sample.json
echo ------------------------
socat file:../../dat/sample.json,rdonly unix-client:/run/sfive/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

echo show query result
echo -----------------
curl -i 'http://localhost:8000/updates?from=2013-10-21T00:00:00Z&to=2013-10-21T12:31:00Z'

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'