diff --git a/tests/clean_system_maintenance.bats b/tests/clean_system_maintenance.bats index 6df0727..6208864 100644 --- a/tests/clean_system_maintenance.bats +++ b/tests/clean_system_maintenance.bats @@ -455,42 +455,6 @@ EOF [[ "$output" != *"SHOULD_NOT_CALL_SOFTWAREUPDATE"* ]] } -@test "check_macos_update respects MO_SOFTWAREUPDATE_TIMEOUT" { - run bash --noprofile --norc <<'EOF' -set -euo pipefail -source "$PROJECT_ROOT/lib/core/common.sh" -source "$PROJECT_ROOT/lib/check/all.sh" - -defaults() { echo "1"; } - -export MO_SOFTWAREUPDATE_TIMEOUT=15 - -run_with_timeout() { - local timeout="${1:-}" - shift - if [[ "$timeout" != "15" ]]; then - echo "BAD_TIMEOUT:$timeout" - return 124 - fi - if [[ "${1:-}" == "softwareupdate" && "${2:-}" == "-l" && "${3:-}" == "--no-scan" ]]; then - echo "No new software available." - return 0 - fi - return 124 -} - -start_inline_spinner(){ :; } -stop_inline_spinner(){ :; } - -check_macos_update -echo "TEST_PASSED" -EOF - - [ "$status" -eq 0 ] - [[ "$output" == *"TEST_PASSED"* ]] - [[ "$output" != *"BAD_TIMEOUT:"* ]] -} - @test "check_macos_update outputs debug info when MO_DEBUG set" { run bash --noprofile --norc <<'EOF' set -euo pipefail diff --git a/tests/purge.bats b/tests/purge.bats index 01c2afb..af34faf 100644 --- a/tests/purge.bats +++ b/tests/purge.bats @@ -242,19 +242,6 @@ EOF [ "$status" -eq 0 ] } -@test "scan_purge_targets finds artifacts via find path" { - run env HOME="$HOME" PROJECT_ROOT="$PROJECT_ROOT" MOLE_PURGE_MIN_DEPTH=1 MOLE_PURGE_MAX_DEPTH=2 bash --noprofile --norc <<'EOF' -set -euo pipefail -PATH="/usr/bin:/bin" -source "$PROJECT_ROOT/lib/clean/project.sh" -mkdir -p "$HOME/dev/app/node_modules" -scan_purge_targets "$HOME/dev" "$HOME/results.txt" -grep -q "node_modules" "$HOME/results.txt" -EOF - - [ "$status" -eq 0 ] -} - @test "select_purge_categories returns failure on empty input" { run env HOME="$HOME" PROJECT_ROOT="$PROJECT_ROOT" bash --noprofile --norc <<'EOF' set -euo pipefail