mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-12 17:07:23 +01:00
Merge branch 'main' of https://github.com/mail-in-a-box/mailinabox
# Conflicts: # management/backup.py
This commit is contained in:
@@ -30,6 +30,7 @@ default_suites=(
|
||||
mail-aliases
|
||||
mail-access
|
||||
management-users
|
||||
management
|
||||
z-push
|
||||
roundcube # browser tests
|
||||
)
|
||||
|
||||
33
tests/suites/management.sh
Normal file
33
tests/suites/management.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- indent-tabs-mode: t; tab-width: 4; -*-
|
||||
#
|
||||
|
||||
test_perform_backup() {
|
||||
# make sure backups work
|
||||
#
|
||||
test_start "perform_backup"
|
||||
record "[create custom.yaml]"
|
||||
cat >$STORAGE_ROOT/backup/custom.yaml <<EOF
|
||||
min_age_in_days: 1
|
||||
target: local
|
||||
EOF
|
||||
record "[run management/backup.py]"
|
||||
pushd "$MIAB_DIR" >/dev/null 2>>$TEST_OF \
|
||||
|| test_failure "could not change directory to miab root"
|
||||
local output code
|
||||
output=$(management/backup.py 2>&1)
|
||||
code=$?
|
||||
echo "$output" >> $TEST_OF
|
||||
if [ $code -ne 0 ]; then
|
||||
test_failure $(python_error "$output")
|
||||
test_failure "backup failed"
|
||||
fi
|
||||
popd >/dev/null 2>>$TEST_OF
|
||||
rm -f $STORAGE_ROOT/backup/custom.yaml
|
||||
test_end
|
||||
}
|
||||
|
||||
suite_start "management"
|
||||
|
||||
test_perform_backup
|
||||
|
||||
suite_end
|
||||
Reference in New Issue
Block a user