mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-10 04:42:31 +01:00
tests: Remove wonky log-grep tests
This might require a change in the handlers where we tag the debug "execstr" specifically so we can parse it correctly in the tests. For now just ensure the handler runs without error.
This commit is contained in:
parent
eb5c4a35e7
commit
f52d1d4656
@ -51,22 +51,6 @@ finish_rdiff() {
|
||||
grep -q "Info: FINISHED: 1 actions run. 0 fatal. 0 error. 0 warning." "${BATS_TMPDIR}/log/backupninja.log"
|
||||
}
|
||||
|
||||
@test "verify if 'options' parameter is reflected in backup command" {
|
||||
grep "Debug: /usr/bin/rdiff-backup" "${BATS_TMPDIR}/_backupninja.log" | grep -q -- --no-carbonfile
|
||||
}
|
||||
|
||||
@test "verify if 'include' parameter is reflected in backup command" {
|
||||
grep "Debug: /usr/bin/rdiff-backup" "${BATS_TMPDIR}/_backupninja.log" | grep -q -- "--include '/var/cache/bntest'"
|
||||
}
|
||||
|
||||
@test "verify if 'exclude' parameter is reflected in backup command" {
|
||||
grep "Debug: /usr/bin/rdiff-backup" "${BATS_TMPDIR}/_backupninja.log" | grep -q -- "--exclude '/var/cache/bntest/var'"
|
||||
}
|
||||
|
||||
@test "verify if 'output_as_info' parameter is reflected in log" {
|
||||
grep "[ Session statistics ]" "${BATS_TMPDIR}/_backupninja.log" | grep -q "Info: "
|
||||
}
|
||||
|
||||
@test "remote destination backup action runs without errors" {
|
||||
setconfig backup.d/test.rdiff testconnect yes
|
||||
setconfig backup.d/test.rdiff bwlimit 1250000
|
||||
@ -78,22 +62,6 @@ finish_rdiff() {
|
||||
grep -q "Info: FINISHED: 1 actions run. 0 fatal. 0 error. 0 warning." "${BATS_TMPDIR}/log/backupninja.log"
|
||||
}
|
||||
|
||||
@test "verify if 'testconnect' parameter is reflected in log" {
|
||||
grep -q "Debug: Connected to bntest1 as vagrant successfully" "${BATS_TMPDIR}/_backupninja.log"
|
||||
}
|
||||
|
||||
@test "verify if 'ignore_version' parameter is reflected in log" {
|
||||
grep -q "Debug: /usr/bin/rdiff-backup -V" "${BATS_TMPDIR}/_backupninja.log"
|
||||
}
|
||||
|
||||
@test "verify if 'bwlimit' parameter is reflected in log" {
|
||||
grep -q "cstream -t 1250000" "${BATS_TMPDIR}/_backupninja.log"
|
||||
}
|
||||
|
||||
@test "verify if 'sshoptions' parameter is reflected in log" {
|
||||
grep -q "ssh -4" "${BATS_TMPDIR}/_backupninja.log"
|
||||
}
|
||||
|
||||
@test "remote destination backup action with '--remove-older-than' runs without errors" {
|
||||
setconfig backup.d/test.rdiff source keep 1
|
||||
setconfig backup.d/test.rdiff dest type remote
|
||||
|
Loading…
Reference in New Issue
Block a user