test: Shell tests should use unified timeout command
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
mkdir -p "${MGMT_TMPDIR}"
|
||||
echo > "${MGMT_TMPDIR}"sshd_config
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=augeas-1.yaml &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix yaml --yaml=augeas-1.yaml &
|
||||
pid=$!
|
||||
|
||||
# kill server on error
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
@@ -8,24 +10,22 @@ if ! command -v etcdctl >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
mkdir /tmp/mgmt/{A..E}
|
||||
|
||||
# kill servers on error/exit
|
||||
trap 'pkill -9 mgmt' EXIT
|
||||
|
||||
"$MGMT" run --hostname h1 --tmp-prefix --no-pgp empty &
|
||||
"$MGMT" run --hostname h2 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 empty &
|
||||
"$MGMT" run --hostname h3 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h1 --tmp-prefix --no-pgp empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h2 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h3 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 empty &
|
||||
|
||||
# wait for everything to converge
|
||||
sleep 30s
|
||||
|
||||
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 put /_mgmt/idealClusterSize 3
|
||||
|
||||
"$MGMT" run --hostname h4 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2385 --server-urls http://127.0.0.1:2386 empty &
|
||||
"$MGMT" run --hostname h5 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2387 --server-urls http://127.0.0.1:2388 empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h4 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2385 --server-urls http://127.0.0.1:2386 empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h5 --tmp-prefix --no-pgp --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2387 --server-urls http://127.0.0.1:2388 empty &
|
||||
|
||||
# wait for everything to converge
|
||||
sleep 30s
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
. ../util.sh
|
||||
|
||||
# these values represent environment variable values below or defaults set in test/shell/env0.mcl
|
||||
regex="123,,:123,321,:true,false:123"
|
||||
|
||||
@@ -14,7 +14,7 @@ if [[ ! "$tmpdir" =~ "/tmp" ]]; then
|
||||
exit 99
|
||||
fi
|
||||
|
||||
env TMPDIR="${tmpdir}" TEST=123 EMPTY="" $timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang env0.mcl
|
||||
env TMPDIR="${tmpdir}" TEST=123 EMPTY="" $TIMEOUT "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang env0.mcl
|
||||
e=$?
|
||||
|
||||
egrep "$regex" "$tmpdir/environ" || fail_test "Could not match '$(cat "$tmpdir/environ")' in '$tmpdir/environ' to '$regex'."
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run empty graphs, we're just testing etcd clustering
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||
pid1=$!
|
||||
sleep 15s # let it startup
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix empty &
|
||||
pid2=$!
|
||||
sleep 15s
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --hostname h3 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h3 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 --tmp-prefix empty &
|
||||
pid3=$!
|
||||
sleep 15s
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run empty graphs, we're just testing etcd clustering
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||
pid1=$!
|
||||
sleep 15s # let it startup
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix empty &
|
||||
pid2=$!
|
||||
sleep 15s
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
"$MGMT" run --hostname h1 --ideal-cluster-size 1 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
"$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
"$MGMT" run --hostname h3 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
"$MGMT" run --hostname h4 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2385 --server-urls http://127.0.0.1:2386 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
$TIMEOUT "$MGMT" run --hostname h1 --ideal-cluster-size 1 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
$TIMEOUT "$MGMT" run --hostname h2 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2381 --server-urls http://127.0.0.1:2382 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
$TIMEOUT "$MGMT" run --hostname h3 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2383 --server-urls http://127.0.0.1:2384 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
$TIMEOUT "$MGMT" run --hostname h4 --seeds http://127.0.0.1:2379 --client-urls http://127.0.0.1:2385 --server-urls http://127.0.0.1:2386 --tmp-prefix --no-pgp lang --lang exchange0.mcl &
|
||||
|
||||
# kill servers on error/exit
|
||||
trap 'pkill -9 mgmt' EXIT
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take a few seconds plus converged timeout, and test we don't hang!
|
||||
# TODO: should we return a different exit code if the resources fail?
|
||||
# TODO: should we be converged if one of the resources has permanently failed?
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=15 --no-watch --no-pgp --tmp-prefix yaml --yaml exec-fail.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=15 --no-watch --no-pgp --tmp-prefix yaml --yaml exec-fail.yaml &
|
||||
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -x
|
||||
set -o pipefail
|
||||
|
||||
@@ -38,7 +40,7 @@ function run_usergroup_test() {
|
||||
setup
|
||||
|
||||
# run till completion
|
||||
sudo -A timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=15 --no-watch --tmp-prefix yaml --yaml ./exec-usergroup/${graph} &
|
||||
sudo -A $TIMEOUT "$MGMT" run --converged-timeout=15 --no-watch --tmp-prefix yaml --yaml ./exec-usergroup/${graph} &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -x
|
||||
|
||||
. ../util.sh
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-mode.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-mode.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
exit 0
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
mkdir -p /tmp/mgmt/a/b/c/
|
||||
|
||||
# run empty graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=examples/deep-dirs.yaml &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix yaml --yaml=examples/deep-dirs.yaml &
|
||||
pid=$!
|
||||
sleep 10s # let it converge
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
mkdir -p /tmp/mgmt/
|
||||
rm /tmp/mgmt/f1 &>/dev/null || true
|
||||
|
||||
# run empty graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=file-move.yaml 2>&1 | tee /tmp/mgmt/file-move.log &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix yaml --yaml=file-move.yaml 2>&1 | tee /tmp/mgmt/file-move.log &
|
||||
pid=$!
|
||||
sleep 5s # let it converge
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
# vim: noet:ts=8:sts=8:sw=8
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -x
|
||||
|
||||
if ! timeout 1s sudo -A true; then
|
||||
@@ -9,7 +11,7 @@ if ! timeout 1s sudo -A true; then
|
||||
fi
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-owner.yaml &
|
||||
$TIMEOUT sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-owner.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
# vim: noet:ts=8:sts=8:sw=8
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -x
|
||||
|
||||
if ! timeout 1s sudo -A true; then
|
||||
@@ -9,7 +11,7 @@ if ! timeout 1s sudo -A true; then
|
||||
fi
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix lang --lang file-source.mcl &
|
||||
$TIMEOUT sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix lang --lang file-source.mcl &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take 15 seconds for longest resources plus startup time to shutdown
|
||||
# we don't want the ^C to allow the rest of the graph to continue executing!
|
||||
# this is a test of mgmt exiting quickly via a fast pause after it sees a ^C
|
||||
$timeout --kill-after=60s 55s "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit1.yaml &
|
||||
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit1.yaml &
|
||||
pid=$!
|
||||
sleep 5s # let the initial resources start to run...
|
||||
killall -SIGINT mgmt # send ^C to exit mgmt
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take 15 seconds for longest resources plus startup time to shutdown
|
||||
# we don't want the ^C to allow the rest of the graph to continue executing!
|
||||
$timeout --kill-after=65s 55s "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit2.yaml &
|
||||
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit2.yaml &
|
||||
pid=$!
|
||||
sleep 10s # let the initial resources start to run...
|
||||
killall -SIGINT mgmt # send ^C to exit mgmt
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take more than 25s plus overhead
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix --no-pgp yaml --yaml graph-fanin-1.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix --no-pgp yaml --yaml graph-fanin-1.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
@@ -8,12 +10,10 @@ if ! ifconfig lo | grep 'inet6 ::1' >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
tmpdir="$($mktemp --tmpdir -d tmp.XXX)"
|
||||
|
||||
# run empty graph listing only to IPv6 addresses
|
||||
"$MGMT" run --client-urls "http://[::1]:2379" --server-urls "http://[::1]:2380" --tmp-prefix empty &
|
||||
$TIMEOUT "$MGMT" run --client-urls "http://[::1]:2379" --server-urls "http://[::1]:2380" --tmp-prefix empty &
|
||||
pid=$!
|
||||
|
||||
# kill server on error/exit
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# XXX: this has not been updated to latest GAPI/Deploy API. Patches welcome!
|
||||
exit 0
|
||||
|
||||
go build -i -o libmgmt libmgmt-change1.go
|
||||
# this example should change graphs frequently, and then shutdown...
|
||||
$timeout --kill-after=30s 20s ./libmgmt &
|
||||
$TIMEOUT ./libmgmt &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# XXX: this has not been updated to latest GAPI/Deploy API. Patches welcome!
|
||||
exit 0
|
||||
|
||||
go build -i -o libmgmt libmgmt-change2.go
|
||||
# this example should change graphs frequently, and then shutdown...
|
||||
$timeout --kill-after=30s 20s ./libmgmt &
|
||||
$TIMEOUT ./libmgmt &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# TODO: do loadavg calls work properly on macOS in travis?
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
. ../util.sh
|
||||
|
||||
# Expected load average values eg: load average: 1.64306640625, 1.8076171875, 1.82958984375
|
||||
# High precision results are preferred (more than the 2 digits in /proc/loadavg at least).
|
||||
# Precision varies (eg: 4, 9 or 11 digits). Hence no strict check for precision but
|
||||
@@ -36,7 +36,7 @@ file "${tmpdir}/loadavg" {
|
||||
}
|
||||
EOF
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang "$tmpdir/load0.mcl" &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang "$tmpdir/load0.mcl" &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -x
|
||||
set -o pipefail
|
||||
|
||||
@@ -44,7 +46,7 @@ sudo mkdir -p /etc/systemd/network
|
||||
sudo ip link add $IFACE type dummy || true
|
||||
|
||||
# run mgmt net res with $IFACE and $ADDR set as above
|
||||
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
|
||||
sudo -A $TIMEOUT "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
|
||||
pid1=$!
|
||||
|
||||
# give the engine time to start up
|
||||
@@ -85,7 +87,7 @@ wait $pid1
|
||||
e1=$?
|
||||
|
||||
# run mgmt net res with $IFACE state => "down"
|
||||
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
|
||||
sudo -A $TIMEOUT "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
|
||||
|
||||
# give the engine time to start up
|
||||
sleep 5
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# Tests the behaviour of the --no-network
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
tmpdir="$($mktemp --tmpdir -d tmp.XXX)"
|
||||
|
||||
# run empty graph, with standalone enabled
|
||||
"$MGMT" run --no-network --prefix "$tmpdir" empty &
|
||||
$TIMEOUT "$MGMT" run --no-network --prefix "$tmpdir" empty &
|
||||
pid=$!
|
||||
|
||||
# kill server on error/exit
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run empty graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --prometheus empty &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --prometheus empty &
|
||||
pid=$!
|
||||
sleep 5s # let it converge
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run empty graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --prometheus --prometheus-listen :52637 empty &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --prometheus --prometheus-listen :52637 empty &
|
||||
pid=$!
|
||||
sleep 5s # let it converge
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
||||
|
||||
# run a graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-3.yaml &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-3.yaml &
|
||||
pid=$!
|
||||
sleep 10s # let it converge
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
||||
|
||||
# run a graph, with prometheus support
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-4.yaml &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-4.yaml &
|
||||
pid=$!
|
||||
sleep 15s # let it converge
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take at least 55s, but fail if we block this
|
||||
# TODO: it would be nice to make sure this test doesn't exit too early!
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --sema 2 --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml sema-1.yaml &
|
||||
$TIMEOUT "$MGMT" run --sema 2 --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml sema-1.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take at least 55s, but fail if we block this
|
||||
# TODO: it would be nice to make sure this test doesn't exit too early!
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix lang --lang sema-2.mcl &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix lang --lang sema-2.mcl &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
# * it is recommended that you run mgmt --converged-timeout=<seconds>
|
||||
# * you can run mgmt with --max-runtime=<seconds> in special scenarios
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
$timeout --kill-after=360s 300s "$MGMT" --help # hello world!
|
||||
$TIMEOUT "$MGMT" --help # hello world!
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t2.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t2.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
e=$?
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
if env | grep -q -e '^TRAVIS=true$'; then
|
||||
# inotify doesn't seem to work properly on travis
|
||||
echo "Travis and Jenkins give wonky results here, skipping test!"
|
||||
@@ -10,11 +12,11 @@ fi
|
||||
mkdir -p "${MGMT_TMPDIR}"mgmt{A..C}
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-a.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-a.yaml &
|
||||
pid1=$!
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-b.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-b.yaml &
|
||||
pid2=$!
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-c.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-c.yaml &
|
||||
pid3=$!
|
||||
|
||||
wait $pid1 # get exit status
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take slightly more than 35s, but fail if we take much longer)
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# should take slightly more than 35s, but fail if we take much longer)
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5b.yaml &
|
||||
$TIMEOUT "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5b.yaml &
|
||||
pid=$!
|
||||
wait $pid # get exit status
|
||||
exit $?
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run till completion
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --no-watch --tmp-prefix yaml --yaml t6.yaml &
|
||||
$TIMEOUT "$MGMT" run --no-watch --tmp-prefix yaml --yaml t6.yaml &
|
||||
pid=$!
|
||||
sleep 10s # let it converge
|
||||
test -e /tmp/mgmt/f1
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
# run empty graph
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp empty &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix --no-pgp empty &
|
||||
pid=$!
|
||||
sleep 10s # let it converge
|
||||
$(sleep 3s && killall -SIGINT mgmt)& # send ^C to exit mgmt
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. "$(dirname "$0")/../util.sh"
|
||||
|
||||
exit 0 # TODO: this test needs to be update to use deploys instead
|
||||
|
||||
#if env | grep -q -e '^TRAVIS=true$'; then
|
||||
@@ -14,7 +16,7 @@ fi
|
||||
|
||||
# set the config file
|
||||
cp -a yaml-change1a.yaml /tmp/mgmt/yaml-change.yaml
|
||||
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml /tmp/mgmt/yaml-change.yaml &
|
||||
$TIMEOUT "$MGMT" run --tmp-prefix yaml --yaml /tmp/mgmt/yaml-change.yaml &
|
||||
pid=$!
|
||||
sleep 5s # let it converge
|
||||
grep -q 'hello world' /tmp/mgmt/change1 # check contents are correct
|
||||
|
||||
@@ -18,6 +18,8 @@ else
|
||||
export STAT="stat"
|
||||
fi
|
||||
|
||||
TIMEOUT="$timeout --kill-after=360s --signal=QUIT 300s"
|
||||
|
||||
fail_test()
|
||||
{
|
||||
echo -e "FAIL: $@"
|
||||
|
||||
Reference in New Issue
Block a user