fix(profiles): keep preflight queries read-only and numeric
This commit is contained in:
@@ -19,3 +19,9 @@ setup() {
|
||||
run run_preformat_check 2>/dev/null || true
|
||||
echo "$output" | grep -qiE "safe|mdm"
|
||||
}
|
||||
|
||||
@test "pre-format checks handle zero profiles without arithmetic diagnostics" {
|
||||
run run_preformat_check
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" != *"integer expression expected"* ]]
|
||||
}
|
||||
|
||||
@@ -20,3 +20,11 @@ setup() {
|
||||
run harden_status 2>/dev/null || true
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "hardening keeps profile queries on stdout" {
|
||||
local calls="$BATS_TEST_TMPDIR/profile-calls"
|
||||
profiles() { printf '%s\n' "$*" > "$calls"; echo '<plist><array/></plist>'; }
|
||||
run harden_live_os "$BATS_TEST_TMPDIR"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$(cat "$calls")" = '-C -output stdout-xml' ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user