test(mcp): pass run-file args in integration fixture
This commit is contained in:
parent
61bd5d3eb7
commit
aa6ddd3bfd
@ -38,7 +38,7 @@ sandbox.serve('exec-lua', function(payload)
|
|||||||
end, { eventloop = el });
|
end, { eventloop = el });
|
||||||
|
|
||||||
sandbox.serve('run-file', function(payload)
|
sandbox.serve('run-file', function(payload)
|
||||||
local result = mcp.executeFile(payload and payload.path);
|
local result = mcp.executeFile(payload and payload.path, nil, payload and payload.args);
|
||||||
return true, {
|
return true, {
|
||||||
ok = result.ok,
|
ok = result.ok,
|
||||||
returns = result.returns or {},
|
returns = result.returns or {},
|
||||||
|
|||||||
@ -56,7 +56,7 @@ test("MCP exec-lua / run-file / write-file / probe round-trip over the gateway",
|
|||||||
traposId: "7:base",
|
traposId: "7:base",
|
||||||
code: "local h = fs.open('/mcp-it.lua', 'r'); local c = h.readAll(); h.close(); return c",
|
code: "local h = fs.open('/mcp-it.lua', 'r'); local c = h.readAll(); h.close(); return c",
|
||||||
});
|
});
|
||||||
assert.match(verify, /"shell.getRunningProgram/);
|
assert.match(verify, /shell\.getRunningProgram/);
|
||||||
|
|
||||||
// Unknown traposId is a transport (not_connected) failure, not a crash.
|
// Unknown traposId is a transport (not_connected) failure, not a crash.
|
||||||
const ghost = await callTool(sandbox, "exec-lua", { traposId: "9:ghost", code: "return 1" });
|
const ghost = await callTool(sandbox, "exec-lua", { traposId: "9:ghost", code: "return 1" });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user