From c93b25741e16c20e283145b630e3b7efcc4ed9c2 Mon Sep 17 00:00:00 2001 From: Agent 3 Date: Wed, 14 Oct 2026 13:32:43 +0330 Subject: [PATCH] test(delivery): build the expected docker mount path with os.path.join MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The adapter builds the work dir 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. Full suite: 537 tests, 0 failures, 3 skipped (docker/deploy_it integration). --- apps/api/tests/test_docker_sandbox.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)