mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 11:52:32 +01:00
tests: add test for admingroup config parameter
This commit is contained in:
parent
ede337dbcd
commit
e1748c9800
@ -72,6 +72,14 @@ create_test_action() {
|
||||
echo "${lines[0]}" | grep -qe '^Configuration files must not be writable/readable by group staff!'
|
||||
}
|
||||
|
||||
@test "permissions: admingroup allows non-root group ownership of backup action" {
|
||||
create_test_action
|
||||
setconfig backupninja.conf admingroup staff
|
||||
chgrp staff "${BATS_TMPDIR}/backup.d/test.sh"
|
||||
run backupninja --now -f "${BATS_TMPDIR}/backupninja.conf"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "reports: report is mailed when halts > 0" {
|
||||
create_test_action halt test_halt
|
||||
run backupninja --now -f "${BATS_TMPDIR}/backupninja.conf" --run "${BATS_TMPDIR}/backup.d/test.sh"
|
||||
|
Loading…
Reference in New Issue
Block a user