test: output etcd server logs when functional tests fail
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>release-3.5
parent
0d85aa1b41
commit
158354755a
12
test
12
test
|
@ -223,6 +223,18 @@ function functional_pass {
|
||||||
kill -s TERM "${agent_pids[@]}" || true
|
kill -s TERM "${agent_pids[@]}" || true
|
||||||
|
|
||||||
if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then
|
if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then
|
||||||
|
printf "\n"
|
||||||
|
echo "FAILED! 'tail -1000 /tmp/etcd-functional-1/etcd.log'"
|
||||||
|
tail -1000 /tmp/etcd-functional-1/etcd.log
|
||||||
|
|
||||||
|
printf "\n"
|
||||||
|
echo "FAILED! 'tail -1000 /tmp/etcd-functional-2/etcd.log'"
|
||||||
|
tail -1000 /tmp/etcd-functional-2/etcd.log
|
||||||
|
|
||||||
|
printf "\n"
|
||||||
|
echo "FAILED! 'tail -1000 /tmp/etcd-functional-3/etcd.log'"
|
||||||
|
tail -1000 /tmp/etcd-functional-3/etcd.log
|
||||||
|
|
||||||
echo "--- FAIL: exit code" ${ETCD_TESTER_EXIT_CODE}
|
echo "--- FAIL: exit code" ${ETCD_TESTER_EXIT_CODE}
|
||||||
exit ${ETCD_TESTER_EXIT_CODE}
|
exit ${ETCD_TESTER_EXIT_CODE}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue