fix(suppression): preserve access to Rosetta configuration
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user