Files
mgmt/test/shell/etcd.sh
James Shubin 358604def2 Enable shell tests
We need to use sudo: required, and dist: trusty to avoid old versions of
bash in travis which don't support the -n argument to the `wait` shell
built-in.

We had to disable the -e checks in etcd.sh since the killall || killall
parts were causing those to trigger in travis.
2016-01-28 09:37:43 -05:00

13 lines
343 B
Bash

# NOTE: boiler plate to run etcd; source with: . etcd.sh; should NOT be +x
cleanup ()
{
killall etcd || killall -9 etcd || true # kill etcd
rm -rf /tmp/etcd/
}
trap cleanup INT QUIT TERM EXIT ERR
mkdir -p /tmp/etcd/
cd /tmp/etcd/ >/dev/null # shush the cd operation
etcd & # start etcd as job # 1
sleep 1s # let etcd startup
cd - >/dev/null