diff --git a/apps/api/tests/test_docker_sandbox.py b/apps/api/tests/test_docker_sandbox.py index 9abbefd..4c33763 100644 --- a/apps/api/tests/test_docker_sandbox.py +++ b/apps/api/tests/test_docker_sandbox.py @@ -234,7 +234,13 @@ async def test_start_session_mounts_only_the_work_tree(tmp_path): argv = runner.last_argv mounts = [argv[i + 1] for i, token in enumerate(argv) if token == "-v"] - assert mounts == [f"{tmp_path}/org1/proj1/work:/workspace"], ( + # The adapter builds the host path with ``os.path.join``, so the expected + # string is built the same way rather than hard-coded with "/" — otherwise + # the assertion fails on Windows, where the separator is a backslash. The + # security property (exactly one bind mount, and it is the work tree) is + # platform-neutral. + expected = os.path.join(str(tmp_path), "org1", "proj1", "work") + assert mounts == [f"{expected}:/workspace"], ( "exactly one bind mount, and it is the work tree" ) assert not any("git" in mount for mount in mounts)