feat: add archive listing and resolution to restore.sh
This commit is contained in:
@@ -47,9 +47,22 @@ test_unknown_command_exits_one() {
|
||||
assert_eq "1" "$rc" "unknown command exits 1"
|
||||
}
|
||||
|
||||
source "$HERE/lib/setup_mocks.sh"
|
||||
|
||||
test_list_archives() {
|
||||
local mockdir out
|
||||
mockdir="$(mktemp -d)"
|
||||
setup_mock_bin "$mockdir"
|
||||
out="$(PATH="$mockdir:$PATH" bash "$RESTORE" --list-archives)"
|
||||
assert_contains "$out" "host-2026-01-01T00-00-00" "list-archives shows first archive"
|
||||
assert_contains "$out" "host-2026-06-01T00-00-00" "list-archives shows latest archive"
|
||||
rm -rf "$mockdir"
|
||||
}
|
||||
|
||||
test_help_exits_zero
|
||||
test_no_args_exits_one
|
||||
test_unknown_command_exits_one
|
||||
test_list_archives
|
||||
|
||||
echo "-----"
|
||||
if [[ "$FAILURES" -gt 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user