test: Enable and fix up some more tests
An unstable engine probably masked some of these issues.
This commit is contained in:
@@ -1,28 +1,22 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
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!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "${MGMT_TMPDIR}"
|
mkdir -p "${MGMT_TMPDIR}"
|
||||||
> "${MGMT_TMPDIR}"sshd_config
|
echo > "${MGMT_TMPDIR}"sshd_config
|
||||||
|
|
||||||
# run empty graph, with prometheus support
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=augeas-1.yaml &
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix yaml --yaml=augeas-1.yaml &
|
|
||||||
pid=$!
|
pid=$!
|
||||||
|
|
||||||
# kill server on error
|
# kill server on error
|
||||||
trap 'kill -SIGINT "$pid"' EXIT
|
trap 'kill -SIGINT "$pid"' EXIT
|
||||||
|
|
||||||
sleep 10s # let it converge
|
sleep 30s # let it converge
|
||||||
|
|
||||||
# make an exception on macOS as augeas behaves differently
|
# make an exception on macOS as augeas behaves differently
|
||||||
if [[ $(uname) == "Darwin" ]] ; then
|
if [[ $(uname) == "Darwin" ]] ; then
|
||||||
value=false
|
value=false
|
||||||
else
|
else
|
||||||
value=no
|
#value=no
|
||||||
|
value=false # seems it's this on linux now too
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make it easier to see why the test failed
|
# make it easier to see why the test failed
|
||||||
@@ -31,11 +25,11 @@ cat "${MGMT_TMPDIR}"sshd_config
|
|||||||
|
|
||||||
grep "X11Forwarding ${value}" "${MGMT_TMPDIR}"sshd_config
|
grep "X11Forwarding ${value}" "${MGMT_TMPDIR}"sshd_config
|
||||||
|
|
||||||
sed -i '' "s/${value}/yes/" "${MGMT_TMPDIR}"sshd_config
|
sed -i 's/'"${value}"'/yes/' "${MGMT_TMPDIR}"sshd_config
|
||||||
|
|
||||||
grep "X11Forwarding yes" "${MGMT_TMPDIR}"sshd_config
|
grep "X11Forwarding yes" "${MGMT_TMPDIR}"sshd_config
|
||||||
|
|
||||||
sleep 10s # Augeas is slow
|
sleep 10s # augeas is slow
|
||||||
|
|
||||||
grep "X11Forwarding ${value}" "${MGMT_TMPDIR}"sshd_config
|
grep "X11Forwarding ${value}" "${MGMT_TMPDIR}"sshd_config
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ trap 'pkill -9 mgmt' EXIT
|
|||||||
"$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 &
|
"$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
|
# wait for everything to converge
|
||||||
sleep 10
|
sleep 30s
|
||||||
|
|
||||||
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 put /_mgmt/idealClusterSize 3
|
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 put /_mgmt/idealClusterSize 3
|
||||||
|
|
||||||
@@ -28,13 +28,13 @@ ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 put /_mgmt/idealClusterSize 3
|
|||||||
"$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 &
|
"$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
|
# wait for everything to converge
|
||||||
sleep 10
|
sleep 30s
|
||||||
|
|
||||||
test "$(ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 member list | wc -l)" -eq 3
|
test "$(ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 member list | wc -l)" -eq 3
|
||||||
|
|
||||||
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2381 put /_mgmt/idealClusterSize 5
|
ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2381 put /_mgmt/idealClusterSize 5
|
||||||
|
|
||||||
# wait for everything to converge
|
# wait for everything to converge
|
||||||
sleep 5
|
sleep 30s
|
||||||
|
|
||||||
test "$(ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2381 member list | wc -l)" -eq 5
|
test "$(ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2381 member list | wc -l)" -eq 5
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if [[ ! "$tmpdir" =~ "/tmp" ]]; then
|
|||||||
exit 99
|
exit 99
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env TMPDIR="${tmpdir}" TEST=123 EMPTY="" $timeout -sKILL 60s "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang env0.mcl
|
env TMPDIR="${tmpdir}" TEST=123 EMPTY="" $timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang env0.mcl
|
||||||
e=$?
|
e=$?
|
||||||
|
|
||||||
egrep "$regex" "$tmpdir/environ" || fail_test "Could not match '$(cat "$tmpdir/environ")' in '$tmpdir/environ' to '$regex'."
|
egrep "$regex" "$tmpdir/environ" || fail_test "Could not match '$(cat "$tmpdir/environ")' in '$tmpdir/environ' to '$regex'."
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# run empty graphs, we're just testing etcd clustering
|
# run empty graphs, we're just testing etcd clustering
|
||||||
$timeout --kill-after=210s 180s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
$timeout --kill-after=360s 300s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||||
pid1=$!
|
pid1=$!
|
||||||
sleep 15s # let it startup
|
sleep 15s # let it startup
|
||||||
|
|
||||||
$timeout --kill-after=210s 180s "$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 --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 &
|
||||||
pid2=$!
|
pid2=$!
|
||||||
sleep 15s
|
sleep 15s
|
||||||
|
|
||||||
$timeout --kill-after=210s 180s "$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 --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 &
|
||||||
pid3=$!
|
pid3=$!
|
||||||
sleep 15s
|
sleep 15s
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# run empty graphs, we're just testing etcd clustering
|
# run empty graphs, we're just testing etcd clustering
|
||||||
$timeout --kill-after=180s 120s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
$timeout --kill-after=360s 300s "$MGMT" run --hostname h1 --tmp-prefix empty &
|
||||||
pid1=$!
|
pid1=$!
|
||||||
sleep 15s # let it startup
|
sleep 15s # let it startup
|
||||||
|
|
||||||
$timeout --kill-after=180s 120s "$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 --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 &
|
||||||
pid2=$!
|
pid2=$!
|
||||||
sleep 15s
|
sleep 15s
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ set -o pipefail
|
|||||||
trap 'pkill -9 mgmt' EXIT
|
trap 'pkill -9 mgmt' EXIT
|
||||||
|
|
||||||
# wait for everything to converge
|
# wait for everything to converge
|
||||||
sleep 10
|
sleep 10s
|
||||||
|
|
||||||
test "$(cat /tmp/mgmt/exchange-* | grep -c h1)" -eq 4
|
test "$(cat /tmp/mgmt/exchange-* | grep -c h1)" -eq 4
|
||||||
test "$(cat /tmp/mgmt/exchange-* | grep -c h2)" -eq 4
|
test "$(cat /tmp/mgmt/exchange-* | grep -c h2)" -eq 4
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# should take a few seconds plus converged timeout, and test we don't hang!
|
# 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 return a different exit code if the resources fail?
|
||||||
# TODO: should we be converged if one of the resources has permanently failed?
|
# TODO: should we be converged if one of the resources has permanently failed?
|
||||||
$timeout --kill-after=120s 75s "$MGMT" run --converged-timeout=15 --no-watch --no-pgp --tmp-prefix yaml --yaml exec-fail.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=15 --no-watch --no-pgp --tmp-prefix yaml --yaml exec-fail.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ function run_usergroup_test() {
|
|||||||
setup
|
setup
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
sudo -A timeout --kill-after=45s 40s "$MGMT" run --converged-timeout=15 --no-watch --tmp-prefix yaml --yaml ./exec-usergroup/${graph} &
|
sudo -A timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=15 --no-watch --tmp-prefix yaml --yaml ./exec-usergroup/${graph} &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ set -x
|
|||||||
. ../util.sh
|
. ../util.sh
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-mode.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-mode.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ exit 0
|
|||||||
mkdir -p /tmp/mgmt/a/b/c/
|
mkdir -p /tmp/mgmt/a/b/c/
|
||||||
|
|
||||||
# run empty graph, with prometheus support
|
# run empty graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix yaml --yaml=examples/deep-dirs.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=examples/deep-dirs.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 10s # let it converge
|
sleep 10s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ mkdir -p /tmp/mgmt/
|
|||||||
rm /tmp/mgmt/f1 &>/dev/null || true
|
rm /tmp/mgmt/f1 &>/dev/null || true
|
||||||
|
|
||||||
# run empty graph, with prometheus support
|
# run empty graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix yaml --yaml=file-move.yaml 2>&1 | tee /tmp/mgmt/file-move.log &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml=file-move.yaml 2>&1 | tee /tmp/mgmt/file-move.log &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 5s # let it converge
|
sleep 5s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if ! timeout 1s sudo -A true; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=30s 25s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-owner.yaml &
|
$timeout --kill-after=360s 300s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml file-owner.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if ! timeout 1s sudo -A true; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=30s 25s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix lang --lang file-source.mcl &
|
$timeout --kill-after=360s 300s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix lang --lang file-source.mcl &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ graph: parallel
|
|||||||
resources:
|
resources:
|
||||||
exec:
|
exec:
|
||||||
- name: exec1
|
- name: exec1
|
||||||
cmd: sleep 15s
|
cmd: sleep 10s
|
||||||
shell: ''
|
shell: ''
|
||||||
timeout: 0
|
timeout: 0
|
||||||
watchcmd: ''
|
watchcmd: ''
|
||||||
@@ -12,7 +12,7 @@ resources:
|
|||||||
ifshell: ''
|
ifshell: ''
|
||||||
state: present
|
state: present
|
||||||
- name: exec2
|
- name: exec2
|
||||||
cmd: sleep 15s
|
cmd: sleep 10s
|
||||||
shell: ''
|
shell: ''
|
||||||
timeout: 0
|
timeout: 0
|
||||||
watchcmd: ''
|
watchcmd: ''
|
||||||
@@ -21,7 +21,7 @@ resources:
|
|||||||
ifshell: ''
|
ifshell: ''
|
||||||
state: present
|
state: present
|
||||||
- name: exec3
|
- name: exec3
|
||||||
cmd: sleep 15s
|
cmd: sleep 10s
|
||||||
shell: ''
|
shell: ''
|
||||||
timeout: 0
|
timeout: 0
|
||||||
watchcmd: ''
|
watchcmd: ''
|
||||||
@@ -30,7 +30,7 @@ resources:
|
|||||||
ifshell: ''
|
ifshell: ''
|
||||||
state: present
|
state: present
|
||||||
- name: exec4
|
- name: exec4
|
||||||
cmd: sleep 15s
|
cmd: sleep 10s
|
||||||
shell: ''
|
shell: ''
|
||||||
timeout: 0
|
timeout: 0
|
||||||
watchcmd: ''
|
watchcmd: ''
|
||||||
@@ -39,7 +39,7 @@ resources:
|
|||||||
ifshell: ''
|
ifshell: ''
|
||||||
state: present
|
state: present
|
||||||
- name: exec0
|
- name: exec0
|
||||||
cmd: sleep 15s
|
cmd: sleep 10s
|
||||||
shell: ''
|
shell: ''
|
||||||
timeout: 0
|
timeout: 0
|
||||||
watchcmd: ''
|
watchcmd: ''
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# should take more than 25s plus overhead
|
# should take more than 25s plus overhead
|
||||||
$timeout --kill-after=50s 45s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix --no-pgp yaml --yaml graph-fanin-1.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix --no-pgp yaml --yaml graph-fanin-1.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ pid=$!
|
|||||||
trap 'pkill -9 mgmt' EXIT
|
trap 'pkill -9 mgmt' EXIT
|
||||||
|
|
||||||
# give mgmt a little time to startup
|
# give mgmt a little time to startup
|
||||||
sleep 10
|
sleep 10s
|
||||||
|
|
||||||
# mgmt configured for ipv6 only should not listen on any IPv4 ports
|
# mgmt configured for ipv6 only should not listen on any IPv4 ports
|
||||||
lsof -Pn -p "$pid" -a -i | grep '127.0.0.1' && false
|
lsof -Pn -p "$pid" -a -i | grep '127.0.0.1' && false
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
if env | grep -q -e '^TRAVIS=true$'; then
|
# TODO: do loadavg calls work properly on macOS in travis?
|
||||||
# loadavg glibc calls don't seem to work properly on osx OS in travis
|
|
||||||
echo "Travis and Jenkins give wonky results here, skipping test!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
@@ -16,7 +12,7 @@ set -o pipefail
|
|||||||
# Precision varies (eg: 4, 9 or 11 digits). Hence no strict check for precision but
|
# Precision varies (eg: 4, 9 or 11 digits). Hence no strict check for precision but
|
||||||
# anything above 3 will do. It is assumed we will hardly ever get a precision lower than 3 digits
|
# anything above 3 will do. It is assumed we will hardly ever get a precision lower than 3 digits
|
||||||
# from the current implementations. Otherwise this test would need to be revised.
|
# from the current implementations. Otherwise this test would need to be revised.
|
||||||
regex="load average: [0-9]\,[0-9]{3,}, [0-9]\,[0-9]{3,}, [0-9]\,[0-9]{3,}"
|
regex="load average: [0-9]\.[0-9]{3,}, [0-9]\.[0-9]{3,}, [0-9]\.[0-9]{3,}"
|
||||||
|
|
||||||
tmpdir="$($mktemp --tmpdir -d tmp.XXX)"
|
tmpdir="$($mktemp --tmpdir -d tmp.XXX)"
|
||||||
if [[ ! "$tmpdir" =~ "/tmp" ]]; then
|
if [[ ! "$tmpdir" =~ "/tmp" ]]; then
|
||||||
@@ -35,12 +31,12 @@ import "sys"
|
|||||||
\$x15 = structlookup(\$theload, "x15")
|
\$x15 = structlookup(\$theload, "x15")
|
||||||
|
|
||||||
file "${tmpdir}/loadavg" {
|
file "${tmpdir}/loadavg" {
|
||||||
content => fmt.printf("load average: %f, %f, %f", \$x1, \$x5, \$x15),
|
content => fmt.printf("load average: %f, %f, %f\n", \$x1, \$x5, \$x15),
|
||||||
state => "exists",
|
state => "exists",
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix --converged-timeout=1 lang --lang "$tmpdir/load0.mcl" &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang "$tmpdir/load0.mcl" &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ sudo mkdir -p /etc/systemd/network
|
|||||||
sudo ip link add $IFACE type dummy || true
|
sudo ip link add $IFACE type dummy || true
|
||||||
|
|
||||||
# run mgmt net res with $IFACE and $ADDR set as above
|
# run mgmt net res with $IFACE and $ADDR set as above
|
||||||
sudo -A $timeout --kill-after=55s 50s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
|
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
|
||||||
pid1=$!
|
pid1=$!
|
||||||
|
|
||||||
# give the engine time to start up
|
# give the engine time to start up
|
||||||
@@ -85,7 +85,7 @@ wait $pid1
|
|||||||
e1=$?
|
e1=$?
|
||||||
|
|
||||||
# run mgmt net res with $IFACE state => "down"
|
# run mgmt net res with $IFACE state => "down"
|
||||||
sudo -A $timeout --kill-after=20 15s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
|
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
|
||||||
|
|
||||||
# give the engine time to start up
|
# give the engine time to start up
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# run empty graph, with prometheus support
|
# run empty graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix --prometheus empty &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --prometheus empty &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 5s # let it converge
|
sleep 5s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# run empty graph, with prometheus support
|
# run empty graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix --prometheus --prometheus-listen :52637 empty &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --prometheus --prometheus-listen :52637 empty &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 5s # let it converge
|
sleep 5s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
||||||
|
|
||||||
# run a graph, with prometheus support
|
# run a graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-3.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-3.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 10s # let it converge
|
sleep 10s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
exit 0 # XXX: temporarily disabled until prometheus is added back post refactor
|
||||||
|
|
||||||
# run a graph, with prometheus support
|
# run a graph, with prometheus support
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-4.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp --prometheus yaml --yaml prometheus-4.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 15s # let it converge
|
sleep 15s # let it converge
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# should take at least 55s, but fail if we block this
|
# 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!
|
# TODO: it would be nice to make sure this test doesn't exit too early!
|
||||||
$timeout --kill-after=120s 110s "$MGMT" run --sema 2 --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml sema-1.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --sema 2 --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml sema-1.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# should take at least 55s, but fail if we block this
|
# 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!
|
# TODO: it would be nice to make sure this test doesn't exit too early!
|
||||||
$timeout --kill-after=120s 110s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix lang --lang sema-2.mcl &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix lang --lang sema-2.mcl &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
$timeout --kill-after=3s 1s "$MGMT" --help # hello world!
|
$timeout --kill-after=360s 300s "$MGMT" --help # hello world!
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
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!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=15s 10s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t2.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t2.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ fi
|
|||||||
mkdir -p "${MGMT_TMPDIR}"mgmt{A..C}
|
mkdir -p "${MGMT_TMPDIR}"mgmt{A..C}
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=15s 10s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-a.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-a.yaml &
|
||||||
pid1=$!
|
pid1=$!
|
||||||
$timeout --kill-after=15s 10s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-b.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-b.yaml &
|
||||||
pid2=$!
|
pid2=$!
|
||||||
$timeout --kill-after=15s 10s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-c.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix yaml --yaml t3-c.yaml &
|
||||||
pid3=$!
|
pid3=$!
|
||||||
|
|
||||||
wait $pid1 # get exit status
|
wait $pid1 # get exit status
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# should take slightly more than 35s, but fail if we take much longer)
|
# should take slightly more than 35s, but fail if we take much longer)
|
||||||
$timeout --kill-after=55s 50s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# should take slightly more than 35s, but fail if we take much longer)
|
# should take slightly more than 35s, but fail if we take much longer)
|
||||||
$timeout --kill-after=55s 50s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5b.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --no-watch --no-pgp --tmp-prefix yaml --yaml t5b.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
exit $?
|
exit $?
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
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!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# run till completion
|
# run till completion
|
||||||
$timeout --kill-after=60s 55s "$MGMT" run --no-watch --tmp-prefix yaml --yaml t6.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --no-watch --tmp-prefix yaml --yaml t6.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 10s # let it converge
|
sleep 10s # let it converge
|
||||||
test -e /tmp/mgmt/f1
|
test -e /tmp/mgmt/f1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# run empty graph
|
# run empty graph
|
||||||
$timeout --kill-after=45s 35s "$MGMT" run --tmp-prefix --no-pgp empty &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix --no-pgp empty &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 10s # let it converge
|
sleep 10s # let it converge
|
||||||
$(sleep 3s && killall -SIGINT mgmt)& # send ^C to exit mgmt
|
$(sleep 3s && killall -SIGINT mgmt)& # send ^C to exit mgmt
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ fi
|
|||||||
|
|
||||||
# set the config file
|
# set the config file
|
||||||
cp -a yaml-change1a.yaml /tmp/mgmt/yaml-change.yaml
|
cp -a yaml-change1a.yaml /tmp/mgmt/yaml-change.yaml
|
||||||
$timeout --kill-after=30s 20s "$MGMT" run --tmp-prefix yaml --yaml /tmp/mgmt/yaml-change.yaml &
|
$timeout --kill-after=360s 300s "$MGMT" run --tmp-prefix yaml --yaml /tmp/mgmt/yaml-change.yaml &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 5s # let it converge
|
sleep 5s # let it converge
|
||||||
grep -q 'hello world' /tmp/mgmt/change1 # check contents are correct
|
grep -q 'hello world' /tmp/mgmt/change1 # check contents are correct
|
||||||
|
|||||||
Reference in New Issue
Block a user