mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 11:55:47 -06:00
test(mcp): make tools-list fixture logs deterministic (#117772)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
This commit is contained in:
committed by
GitHub
parent
aadbb00f2c
commit
1f2ddec728
@@ -91,6 +91,7 @@ async function writeListToolsMcpServer(params: {
|
||||
await writeExecutable(
|
||||
params.filePath,
|
||||
`#!/usr/bin/env node
|
||||
import { appendFileSync } from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
const logPath = ${JSON.stringify(params.logPath)};
|
||||
@@ -156,7 +157,7 @@ if (hangToolCallsUntilRestartMarkerPath) {
|
||||
}
|
||||
}
|
||||
function log(line) {
|
||||
void fs.appendFile(logPath, line + "\\n", "utf8").catch(() => {});
|
||||
appendFileSync(logPath, line + "\\n", "utf8");
|
||||
}
|
||||
function send(message) {
|
||||
process.stdout.write(JSON.stringify(message) + "\\n");
|
||||
|
||||
Reference in New Issue
Block a user