mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-23 03:02:32 +01:00
tests: Declare useful global vars in common.bash
This commit is contained in:
parent
61b7fe44a2
commit
9332906386
@ -2,8 +2,8 @@ load common
|
||||
|
||||
begin_borg() {
|
||||
apt-get -qq install debootstrap borgbackup
|
||||
if [ ! -d /var/cache/bntest ]; then
|
||||
debootstrap --variant=minbase testing /var/cache/bntest
|
||||
if [ ! -d "$BN_SRCDIR" ]; then
|
||||
debootstrap --variant=minbase testing "$BN_SRCDIR"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -17,8 +17,8 @@ bwlimit =
|
||||
|
||||
[source]
|
||||
init = yes
|
||||
include = /var/cache/bntest
|
||||
exclude = /var/cache/bntest/var
|
||||
include = ${BN_SRCDIR}
|
||||
exclude = ${BN_SRCDIR}/var
|
||||
create_options =
|
||||
prune = yes
|
||||
keep = 30d
|
||||
@ -27,9 +27,9 @@ cache_directory =
|
||||
|
||||
[dest]
|
||||
user =
|
||||
host =
|
||||
host = localhost
|
||||
port = 22
|
||||
directory = /var/backups/testborg
|
||||
directory = ${BN_BACKUPDIR}/testborg
|
||||
archive =
|
||||
compression = lz4
|
||||
encryption = none
|
||||
|
@ -1,5 +1,11 @@
|
||||
setup() {
|
||||
|
||||
# declare some constants
|
||||
readonly BN_REMOTEUSER="vagrant"
|
||||
readonly BN_REMOTEHOST="bntest1"
|
||||
readonly BN_BACKUPDIR="/var/backups"
|
||||
readonly BN_SRCDIR="/var/cache/bntest"
|
||||
|
||||
# Write a basic backupninja config file
|
||||
cat << EOF > "${BATS_TMPDIR}/backupninja.conf"
|
||||
when = manual
|
||||
|
Loading…
Reference in New Issue
Block a user