fix(validation): restore isolated local checks

This commit is contained in:
2026-10-30 04:21:56 -03:00
parent 82188e8731
commit 3151b0c7dd
36 changed files with 586 additions and 227 deletions
+7 -1
View File
@@ -38,10 +38,16 @@ teardown() {
suppress_enrollment "$TEST_DIR" 2>/dev/null || true
local ldp="$TEST_DIR/private/var/db/com.apple.xpc.launchd/disabled.plist"
[ -f "$ldp" ]
run /usr/libexec/PlistBuddy -c "Print :com.apple.ManagedClient.enroll" "$ldp" 2>/dev/null
run "$PB" -c "Print :com.apple.ManagedClient.enroll" "$ldp"
[ "$output" = "true" ]
}
@test "PlistBuddy fixture rejects writes outside the test suite" {
run "$PB" -c 'Add :test bool true' "$BATS_TEST_DIRNAME/../README.md"
[ "$status" -ne 0 ]
[[ "$output" == *"Fixture refused path outside the suite"* ]]
}
@test "dry-run mode does not write files" {
DRY_RUN=true
suppress_enrollment "$TEST_DIR" 2>/dev/null || true