File: test_integration_supernode.sh

package info (click to toggle)
n2n 3.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,776 kB
  • sloc: ansic: 29,672; sh: 1,502; python: 621; makefile: 442; perl: 270; exp: 4
file content (33 lines) | stat: -rwxr-xr-x 765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# Do some quick tests via the Json API against the supernode
#

AUTH=n2n

# boilerplate so we can support whaky cmake dirs
[ -z "$TOPDIR" ] && TOPDIR=.
[ -z "$BINDIR" ] && BINDIR=.

docmd() {
    echo "###"
    "$@"
    echo
}

# start it running in the background
docmd ${BINDIR}/supernode -v

docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 communities
docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 packetstats
docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 edges --raw

docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 verbose
docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 -k $AUTH --write verbose 1

# looks strange, but we are querying the state of the "stop" verb
docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 stop

# stop it
docmd ${TOPDIR}/scripts/n2n-ctl -t 5645 -k $AUTH --write stop