fix(restore): harden restore checks and add authelia smoke scaffold
This commit is contained in:
@@ -37,8 +37,14 @@ require_cmd curl
|
||||
require_path "$BORG_PASSPHRASE_FILE_DEFAULT"
|
||||
require_path "$COMPOSE_FILE"
|
||||
|
||||
RESTORE_SUCCESS=0
|
||||
cleanup() {
|
||||
cleanup_compose "$COMPOSE_FILE"
|
||||
if [ "$RESTORE_SUCCESS" -ne 1 ]; then
|
||||
preserve_on_failure "vaultwarden" "$RESTORE_ROOT"
|
||||
rm -rf "$EXTRACT_DIR"
|
||||
return
|
||||
fi
|
||||
if [ "$KEEP_DATA" -ne 1 ]; then
|
||||
rm -rf "$DATA_DIR"
|
||||
fi
|
||||
@@ -82,4 +88,5 @@ write_report "$REPORT_FILE" <<EOF
|
||||
- Test data was cleaned after success: \`$([ "$KEEP_DATA" -eq 1 ] && echo no || echo yes)\`
|
||||
EOF
|
||||
|
||||
RESTORE_SUCCESS=1
|
||||
echo "Vaultwarden restore test ok -> $REPORT_FILE"
|
||||
|
||||
Reference in New Issue
Block a user