test(fixtures): allow the active test temporary directory
This commit is contained in:
@@ -16,7 +16,8 @@ with (root / "platform-calls.jsonl").open("a") as log:
|
||||
|
||||
def fixture_path(value):
|
||||
path = pathlib.Path(value).resolve()
|
||||
if not path.is_relative_to(root):
|
||||
active_test = pathlib.Path(os.environ["BATS_TEST_TMPDIR"]).resolve()
|
||||
if not (path.is_relative_to(root) or path.is_relative_to(active_test)):
|
||||
sys.exit(f"Fixture refused path outside the suite: {path}")
|
||||
return path
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "suppress_enrollment disables daemons" {
|
||||
TEST_DIR="$BATS_TEST_TMPDIR/volume"
|
||||
DRY_RUN=false
|
||||
suppress_enrollment "$TEST_DIR" 2>/dev/null || true
|
||||
local ldp="$TEST_DIR/private/var/db/com.apple.xpc.launchd/disabled.plist"
|
||||
|
||||
Reference in New Issue
Block a user