mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 00:20:22 +00:00
test(gateway): harden tools invoke cron regression harness
This commit is contained in:
@@ -76,14 +76,18 @@ let server: ReturnType<typeof createServer> | undefined;
|
||||
|
||||
beforeAll(async () => {
|
||||
server = createServer((req, res) => {
|
||||
void handleToolsInvokeHttpRequest(req, res, {
|
||||
auth: { mode: "token", token: TEST_GATEWAY_TOKEN, allowTailscale: false },
|
||||
}).then((handled) => {
|
||||
void (async () => {
|
||||
const handled = await handleToolsInvokeHttpRequest(req, res, {
|
||||
auth: { mode: "token", token: TEST_GATEWAY_TOKEN, allowTailscale: false },
|
||||
});
|
||||
if (handled) {
|
||||
return;
|
||||
}
|
||||
res.statusCode = 404;
|
||||
res.end("not found");
|
||||
})().catch((err) => {
|
||||
res.statusCode = 500;
|
||||
res.end(String(err));
|
||||
});
|
||||
});
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user