rename project to runaway
This commit is contained in:
+10
-10
@@ -13,7 +13,7 @@ suppress_fixture() {
|
||||
|
||||
@test "heal repairs old Rosetta blocks even when suppression is otherwise intact" {
|
||||
local entrypoint
|
||||
for entrypoint in unleash unleash-standalone.sh; do
|
||||
for entrypoint in runaway runaway-standalone.sh; do
|
||||
local script="$BATS_TEST_DIRNAME/../$entrypoint"
|
||||
local target="$BATS_TEST_TMPDIR/$entrypoint" hosts
|
||||
hosts="$target/private/etc/hosts"
|
||||
@@ -27,7 +27,7 @@ suppress_fixture() {
|
||||
|
||||
@test "heal dry run preserves old Rosetta entries" {
|
||||
local entrypoint
|
||||
for entrypoint in unleash unleash-standalone.sh; do
|
||||
for entrypoint in runaway runaway-standalone.sh; do
|
||||
local script="$BATS_TEST_DIRNAME/../$entrypoint"
|
||||
local target="$BATS_TEST_TMPDIR/$entrypoint" hosts
|
||||
hosts="$target/private/etc/hosts"
|
||||
@@ -36,13 +36,13 @@ suppress_fixture() {
|
||||
cp "$hosts" "$target/original"
|
||||
suppress_fixture "$script" "$target" heal_suppress true
|
||||
cmp "$target/original" "$hosts"
|
||||
[ ! -e "$hosts.unleash-rosetta.bak" ]
|
||||
[ ! -e "$hosts.runaway-rosetta.bak" ]
|
||||
done
|
||||
}
|
||||
|
||||
@test "suppression does not add hosts blocks for Rosetta configuration" {
|
||||
local entrypoint
|
||||
for entrypoint in unleash unleash-standalone.sh; do
|
||||
for entrypoint in runaway runaway-standalone.sh; do
|
||||
local script="$BATS_TEST_DIRNAME/../$entrypoint"
|
||||
local target="$BATS_TEST_TMPDIR/$entrypoint"
|
||||
mkdir -p "$target/private/etc"
|
||||
@@ -56,27 +56,27 @@ suppress_fixture() {
|
||||
|
||||
@test "suppression repairs its old Rosetta blocks with an unchanged backup on rerun" {
|
||||
local entrypoint
|
||||
for entrypoint in unleash unleash-standalone.sh; do
|
||||
for entrypoint in runaway runaway-standalone.sh; do
|
||||
local script="$BATS_TEST_DIRNAME/../$entrypoint"
|
||||
local target="$BATS_TEST_TMPDIR/$entrypoint" hosts
|
||||
hosts="$target/private/etc/hosts"
|
||||
mkdir -p "$(dirname "$hosts")"
|
||||
printf '127.0.0.1 localhost\n# Added by unleash — DEP enrollment block\n0.0.0.0 configuration.apple.com\n:: configuration.apple.com\n' > "$hosts"
|
||||
printf '127.0.0.1 localhost\n# Added by runaway — DEP enrollment block\n0.0.0.0 configuration.apple.com\n:: configuration.apple.com\n' > "$hosts"
|
||||
cp "$hosts" "$target/original"
|
||||
suppress_fixture "$script" "$target"
|
||||
run grep -q 'configuration[.]apple[.]com' "$hosts"
|
||||
[ "$status" -eq 1 ]
|
||||
cmp "$target/original" "$hosts.unleash-rosetta.bak"
|
||||
cmp "$target/original" "$hosts.runaway-rosetta.bak"
|
||||
cp "$hosts" "$target/repaired"
|
||||
suppress_fixture "$script" "$target"
|
||||
cmp "$target/repaired" "$hosts"
|
||||
cmp "$target/original" "$hosts.unleash-rosetta.bak"
|
||||
cmp "$target/original" "$hosts.runaway-rosetta.bak"
|
||||
done
|
||||
}
|
||||
|
||||
@test "suppression preserves Rosetta blocks outside its generated section" {
|
||||
local entrypoint
|
||||
for entrypoint in unleash unleash-standalone.sh; do
|
||||
for entrypoint in runaway runaway-standalone.sh; do
|
||||
local script="$BATS_TEST_DIRNAME/../$entrypoint"
|
||||
local target="$BATS_TEST_TMPDIR/$entrypoint" hosts
|
||||
hosts="$target/private/etc/hosts"
|
||||
@@ -85,6 +85,6 @@ suppress_fixture() {
|
||||
suppress_fixture "$script" "$target"
|
||||
grep -Fxq '0.0.0.0 configuration.apple.com' "$hosts"
|
||||
grep -Fxq ':: configuration.apple.com manual.alias' "$hosts"
|
||||
[ ! -e "$hosts.unleash-rosetta.bak" ]
|
||||
[ ! -e "$hosts.runaway-rosetta.bak" ]
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user