Skip to content

Commit ed84e0f

Browse files
committed
test(matrix): isolate mcp-serve e2e from host harness env
1 parent f6c86bb commit ed84e0f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/helpers/matrix_cases.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,10 @@ export const cases: Record<string, () => void | Promise<void>> = {
23042304
},
23052305
'mcp-serve': async () => {
23062306
// mcp-serve is a long-running stdio server, not a one-shot command, so it can't go through the shared spawnSync-based run() helper (spawnSync writes stdin, closes it, and waits for exit -- but this process never exits on its own). Spawn it directly, write one real tools/list JSON-RPC request, read stdout until a response with a matching id arrives (or a bounded timeout elapses), then always kill the child so a broken response can't hang the suite.
2307-
const child = spawn(process.execPath, [BUNDLE, 'mcp-serve'], { cwd: repo, env: tgEnv(dataBase) })
2307+
const child = spawn(process.execPath, [BUNDLE, 'mcp-serve'], {
2308+
cwd: repo,
2309+
env: { ...tgEnv(dataBase), TOKEN_GOAT_HARNESS_OVERRIDE: 'generic' },
2310+
})
23082311
let stderr = ''
23092312
child.stderr.on('data', (chunk: Buffer) => {
23102313
stderr += chunk.toString('utf8')

0 commit comments

Comments
 (0)