mirror of
https://github.com/usestrix/strix.git
synced 2026-10-16 04:28:23 +00:00
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
This commit is contained in:
parent
07be5a1b00
commit
1cd95a4f93
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue