Skip to content
Snippets Groups Projects
Commit 8d9b0418 authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

tests: replace test_sh() with setup_sh()

parent 26e530ea
Branches
Tags
1 merge request!46Add a testsuite
load common load common
test_sh() { setup_sh() {
cat << EOF > "${BATS_TMPDIR}/backup.d/test.sh" cat << EOF > "${BATS_TMPDIR}/backup.d/test.sh"
!#/bin/sh !#/bin/sh
touch /var/backups/test_sh touch /var/backups/test_sh
...@@ -10,7 +10,6 @@ EOF ...@@ -10,7 +10,6 @@ EOF
} }
@test "sh: runs and creates file" { @test "sh: runs and creates file" {
test_sh
run backupninja -f "${BATS_TMPDIR}/backupninja.conf" --now --run "${BATS_TMPDIR}/backup.d/test.sh" run backupninja -f "${BATS_TMPDIR}/backupninja.conf" --now --run "${BATS_TMPDIR}/backup.d/test.sh"
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
[ -f /var/backups/test_sh ] [ -f /var/backups/test_sh ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment