test(droid): enforce POSIX fixture permissions
This commit is contained in:
1 parent
909f3dd106
commit
dce7d1288a
2 files changed
+10
-2
No files matched your search
@@ -225,10 +225,16 @@ def test_guard_blocks_and_audit_preserves_native_payload(
|
|||||||
guard = managed_handler(hooks, "PreToolUse", "guard.py")
|
guard = managed_handler(hooks, "PreToolUse", "guard.py")
|
||||||
audit = managed_handler(hooks, "PostToolUse", "hook.py")
|
audit = managed_handler(hooks, "PostToolUse", "hook.py")
|
||||||
assert guard is not None and audit is not None
|
assert guard is not None and audit is not None
|
||||||
write_json(fixture.agent_dir / "status-cache.json", {
|
status_cache_path = fixture.agent_dir / "status-cache.json"
|
||||||
|
write_json(
|
||||||
|
status_cache_path,
|
||||||
|
{
|
||||||
"status": "frozen",
|
"status": "frozen",
|
||||||
"cached_at": time.time(),
|
"cached_at": time.time(),
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
if os.name != "nt":
|
||||||
|
status_cache_path.chmod(0o600)
|
||||||
pre_payload = {
|
pre_payload = {
|
||||||
"session_id": "session-1",
|
"session_id": "session-1",
|
||||||
"transcript_path": str(fixture.home_dir / "transcript.jsonl"),
|
"transcript_path": str(fixture.home_dir / "transcript.jsonl"),
|
||||||
|
|||||||
@@ -229,6 +229,8 @@ def test_cli_preflight_blocks_disabled_hooks_before_runtime_creation(
|
|||||||
VALID_PRIVATE_KEY,
|
VALID_PRIVATE_KEY,
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
|
if os.name != "nt":
|
||||||
|
key_path.chmod(0o600)
|
||||||
environment = {
|
environment = {
|
||||||
**os.environ,
|
**os.environ,
|
||||||
"HOME": str(home_dir),
|
"HOME": str(home_dir),
|
||||||
|
|||||||
Reference in new issue
Block a user