Files
coder/coderd
Ethan 0992cdefe6 test(coderd/mcp): fix TestMCPHTTP_E2E_TemplateBrowserOnly on Windows (#32510)
Closes CORE-901

`TestMCPHTTP_E2E_TemplateBrowserOnly` fails on Windows in the [nightly
gauntlet](https://github.com/coder/coder/actions/runs/44456110594/job/135331397178).
The test reads `/tmp/file.txt` through the agent, which isn't an
absolute path on Windows, so the agent rejects it before we ever make
the template browser-only.

To fix, we'll build the path with `filepath.Join(os.TempDir(), ...)`,
the same as the other workspace tool tests.
`TestMCPHTTP_E2E_WorkspaceSSHAuthz` gets the same change, as I assume
that's where the `/tmp` path was copied from. It only passes on Windows
today because the dial is refused before the agent sees the path. The
failing assertion also didn't say why the tool call failed, so it now
includes the tool's error.

The test was added in #30578, and PR CI doesn't run this package on
Windows, so I've only run the fix on Linux.
2026-11-23 16:01:09 +11:00
..