1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 23:05:08 +00:00

test: mock defaults in tmutil tests to bypass early check added in #510

This commit is contained in:
tw93
2026-02-28 11:45:26 +08:00
parent 7568bfc579
commit 022b42687e
2 changed files with 15 additions and 0 deletions

View File

@@ -267,6 +267,9 @@ set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/system.sh"
defaults() { echo "1"; }
clean_time_machine_failed_backups
EOF
@@ -310,6 +313,9 @@ set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/system.sh"
defaults() { echo "1"; }
clean_time_machine_failed_backups
EOF

View File

@@ -274,6 +274,9 @@ set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/system.sh"
defaults() { echo "1"; }
tmutil() {
if [[ "$1" == "destinationinfo" ]]; then
echo "No destinations configured"
@@ -297,6 +300,9 @@ set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/system.sh"
defaults() { echo "1"; }
run_with_timeout() {
printf '%s\n' \
"com.apple.TimeMachine.2023-10-25-120000" \
@@ -321,6 +327,9 @@ set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/system.sh"
defaults() { echo "1"; }
run_with_timeout() { echo "Snapshots for disk /:"; }
start_section_spinner(){ :; }
stop_section_spinner(){ :; }