Add shell based test harness

This allows you to simulate one or more simultaneously running mgmt
processes. It should be easy to use by following the test cases provided.
This commit is contained in:
James Shubin
2016-01-20 03:59:04 -05:00
parent 820294cd9a
commit d5367b7a1c
12 changed files with 306 additions and 2 deletions

14
test/shell/t2.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
. etcd.sh # start etcd as job # 1
# run till completion
timeout --kill-after=15s 10s ./mgmt run --file t2.yaml --converged-timeout=5 --no-watch &
#jobs # etcd is 1
wait -n 2 # wait for mgmt to exit
test -e /tmp/mgmt/f1
test -e /tmp/mgmt/f2
test -e /tmp/mgmt/f3
test ! -e /tmp/mgmt/f4