Debian Codegraph @

examples/complex-etcd/koanfetcd.sh

raw
1 # Testing script. Requirements: installed etcd
2
3 # setting the directory for the etcd
4 CURRENT_DIR=`pwd`
5 ETCD_TESTDIR="$CURRENT_DIR/etcdtest"
6
7 etcd --data-dir "$ETCD_TESTDIR" &
8
9 etcdctl endpoint health --dial-timeout=4s
10
11 # main test
12 echo -e "\nChecking...\n"
13 go run main.go
14
15 ETCD_PID=`pidof etcd`
16 kill -9 $ETCD_PID
17
18 rm -rf "$ETCD_TESTDIR"
19 #rm k_etcd_check