fix(suppression): preserve access to Rosetta configuration

This commit is contained in:
2026-10-30 03:56:14 -03:00
parent e0f2026a2f
commit 7ca3d4f2d4
3 changed files with 19 additions and 2 deletions
-1
View File
@@ -50,7 +50,6 @@ suppress_enrollment() {
gdmf.apple.com gdmf.apple.com
ax.init-content.apple.com ax.init-content.apple.com
init-content.apple.com init-content.apple.com
configuration.apple.com
xp.apple.com xp.apple.com
gs.apple.com gs.apple.com
tb.apple.com tb.apple.com
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bats
@test "suppression does not add hosts blocks for Rosetta configuration" {
local entrypoint
for entrypoint in unleash unleash-standalone.sh; do
local script="$BATS_TEST_DIRNAME/../$entrypoint"
local target="$BATS_TEST_TMPDIR/$entrypoint"
mkdir -p "$target/private/etc"
printf '127.0.0.1 localhost\n' > "$target/private/etc/hosts"
run bash -u -c '
source <(sed '\''/^main "\$@"$/d'\'' "$1")
PB=:
suppress_enrollment "$2"
' "$script" "$script" "$target"
[ "$status" -eq 0 ]
! grep -q 'configuration[.]apple[.]com' "$target/private/etc/hosts"
grep -q '^127.0.0.1 localhost$' "$target/private/etc/hosts"
done
}
-1
View File
@@ -459,7 +459,6 @@ suppress_enrollment() {
gdmf.apple.com gdmf.apple.com
ax.init-content.apple.com ax.init-content.apple.com
init-content.apple.com init-content.apple.com
configuration.apple.com
xp.apple.com xp.apple.com
gs.apple.com gs.apple.com
tb.apple.com tb.apple.com