tests: replace test_sh() with setup_sh()

This commit is contained in:
Jerome Charaoui 2018-07-15 00:50:15 -04:00
parent 26e530ea9d
commit 8d9b0418bb

View File

@ -1,6 +1,6 @@
load common
test_sh() {
setup_sh() {
cat << EOF > "${BATS_TMPDIR}/backup.d/test.sh"
!#/bin/sh
touch /var/backups/test_sh
@ -10,7 +10,6 @@ EOF
}
@test "sh: runs and creates file" {
test_sh
run backupninja -f "${BATS_TMPDIR}/backupninja.conf" --now --run "${BATS_TMPDIR}/backup.d/test.sh"
[ "$status" -eq 0 ]
[ -f /var/backups/test_sh ]