Skip to content

The agent that grows with you

test: run the drive-letter volume parse on the Windows lanes

Austin Pickettf57e46207d2a
diff --git a/tests/gateway/test_platform_base.py b/tests/gateway/test_platform_base.py
index 9755aefe1be..bd9cdf890c5 100644
--- a/tests/gateway/test_platform_base.py
+++ b/tests/gateway/test_platform_base.py
@@ -874,7 +874,21 @@ class TestMediaDeliveryDefaultMode:
def test_windows_drive_letter_host_mount_parses(monkeypatch):
"""``C:/data:/workspace`` splits on the container colon, not the drive, and keeps the
POSIX container root on every gateway (``Path("/workspace").is_absolute()`` is False on
- Windows). Unmarked so the Windows lanes run it."""
+ Windows; the Windows lanes run the marked twin below)."""
+ import json
+
+ from gateway.platforms import base
+
+ monkeypatch.setenv("TERMINAL_DOCKER_VOLUMES", json.dumps(["C:/data:/workspace:ro"]))
+ monkeypatch.setattr(base, "_resolve_path", lambda p, **_k: p)
+
+ assert base._parse_docker_volume_mounts() == [(Path("C:/data"), Path("/workspace"))]
+
+
+def test_windows_drive_letter_host_mount_parses_on_windows(monkeypatch):
+ """Windows-lane twin of the parse test: there ``Path("/workspace").is_absolute()`` is
+ False, which is the case the fix is for (the lanes only run ``-m platforms``)."""
import json
from gateway.platforms import base