1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-11 02:29:19 +00:00

test: remove obsolete environment variable tests

This commit is contained in:
Tw93
2026-01-03 13:44:55 +08:00
parent 5ee7d2d703
commit c4df04ff4f
2 changed files with 0 additions and 49 deletions

View File

@@ -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