mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-23 03:02:32 +01:00
tests: Show debug logfile when a test case fails
This commit is contained in:
parent
48c3da6986
commit
4c56e50857
@ -1,8 +1,9 @@
|
||||
setup() {
|
||||
# Write a basic config file
|
||||
|
||||
# Write a basic backupninja config file
|
||||
cat << EOF > "${BATS_TMPDIR}/backupninja.conf"
|
||||
when = manual
|
||||
loglevel = 4
|
||||
loglevel = 5
|
||||
reportemail = root
|
||||
reportsuccess = yes
|
||||
reportinfo = no
|
||||
@ -24,6 +25,11 @@ EOF
|
||||
}
|
||||
|
||||
teardown() {
|
||||
|
||||
# Print the debug log in case the test case fails
|
||||
echo "cat ${BATS_TMPDIR}/log/backupninja.log :"
|
||||
cat "${BATS_TMPDIR}/log/backupninja.log"
|
||||
|
||||
# Clean up
|
||||
rm -rf "${BATS_TMPDIR}/backupninja.conf" \
|
||||
"${BATS_TMPDIR}/log" \
|
||||
|
Loading…
Reference in New Issue
Block a user