mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-09-19 23:21:40 +02:00
tests: Improve handling of log file during teardown
This commit is contained in:
parent
6f5411db03
commit
54fd9f10b8
@ -44,8 +44,14 @@ EOF
|
||||
teardown() {
|
||||
|
||||
# Print the debug log in case the test case fails
|
||||
if [ -f "${BATS_TMPDIR}/log/backupninja.log" ]; then
|
||||
echo "cat ${BATS_TMPDIR}/log/backupninja.log :"
|
||||
cat "${BATS_TMPDIR}/log/backupninja.log"
|
||||
# Copy logfile so it can be examined in subsequent tests
|
||||
cp "${BATS_TMPDIR}/log/backupninja.log" "${BATS_TMPDIR}/_backupninja.log"
|
||||
else
|
||||
echo "backupninja.log not found"
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
rm -rf "${BATS_TMPDIR}/backupninja.conf" \
|
||||
|
Loading…
Reference in New Issue
Block a user