mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 20:02:32 +01:00
tests: split verification from creation
This commit is contained in:
parent
30c9c7391e
commit
70365ec658
@ -374,6 +374,9 @@ finish_borg() {
|
|||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
greplog 'Debug: executing borg init$' 'Debug: borg init --encryption=repokey'
|
greplog 'Debug: executing borg init$' 'Debug: borg init --encryption=repokey'
|
||||||
greplog "Warning: Repository has been initialized"
|
greplog "Warning: Repository has been initialized"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "verify local backup with encryption" {
|
||||||
export BORG_PASSPHRASE="123foo"
|
export BORG_PASSPHRASE="123foo"
|
||||||
run borg extract --dry-run "${BN_BACKUPDIR}/testborg::testarchive"
|
run borg extract --dry-run "${BN_BACKUPDIR}/testborg::testarchive"
|
||||||
[ "$status" -eq 2 ]
|
[ "$status" -eq 2 ]
|
||||||
@ -392,6 +395,9 @@ finish_borg() {
|
|||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
greplog 'Debug: executing borg init$' 'Debug: borg init --encryption=repokey'
|
greplog 'Debug: executing borg init$' 'Debug: borg init --encryption=repokey'
|
||||||
greplog "Warning: Repository has been initialized"
|
greplog "Warning: Repository has been initialized"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "verify remote backup with encryption" {
|
||||||
export BORG_PASSPHRASE="123foo"
|
export BORG_PASSPHRASE="123foo"
|
||||||
run borg extract --dry-run "ssh://${BN_REMOTEUSER}@${BN_REMOTEHOST}:22${BN_BACKUPDIR}/testborg::testarchive"
|
run borg extract --dry-run "ssh://${BN_REMOTEUSER}@${BN_REMOTEHOST}:22${BN_BACKUPDIR}/testborg::testarchive"
|
||||||
[ "$status" -eq 2 ]
|
[ "$status" -eq 2 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user