From 1cd95a4f9314da1505471912b5b277540e15e8a0 Mon Sep 17 00:00:00 2001 From: J0kkeR Date: Tue, 13 Oct 2026 00:20:32 +0800 Subject: [PATCH] test(sandbox): skip host-identity tests on non-Linux platforms Address review feedback: os.getuid/os.getgid do not exist on Windows and _host_identity_env() short-circuits off Linux, so the new tests can only run there. Refs #1514 --- tests/test_host_identity_env.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_host_identity_env.py b/tests/test_host_identity_env.py index 542d4df7..3d15fbe4 100644 --- a/tests/test_host_identity_env.py +++ b/tests/test_host_identity_env.py @@ -1,8 +1,15 @@ import os +import sys from types import SimpleNamespace +import pytest + from strix.runtime import session_manager +pytestmark = pytest.mark.skipif( + sys.platform != "linux", reason="sandbox uid mapping is Linux-only" +) + def _as(monkeypatch, uid: int, gid: int) -> None: monkeypatch.setattr(os, "getuid", lambda: uid)