feat(mcp): resume queued calculation jobs
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
import { afterAll, beforeAll, describe, expect, it } from "bun:test";
|
||||
import { mkdtempSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import plugin from "../../.opencode/plugins/tjwater-tools.js";
|
||||
|
||||
const originalConnectionPath = process.env.TJWATER_AGENT_MCP_CONNECTION_PATH;
|
||||
const connectionRoot = mkdtempSync(join(tmpdir(), "call-id-plugin-"));
|
||||
const originalInternalToken = process.env.AGENT_INTERNAL_TOKEN;
|
||||
|
||||
beforeAll(() => {
|
||||
process.env.TJWATER_AGENT_MCP_CONNECTION_PATH = join(connectionRoot, "absent.json");
|
||||
process.env.AGENT_INTERNAL_TOKEN = "test-internal-token";
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
if (originalConnectionPath === undefined) delete process.env.TJWATER_AGENT_MCP_CONNECTION_PATH;
|
||||
else process.env.TJWATER_AGENT_MCP_CONNECTION_PATH = originalConnectionPath;
|
||||
rmSync(connectionRoot, { recursive: true, force: true });
|
||||
if (originalInternalToken === undefined) delete process.env.AGENT_INTERNAL_TOKEN;
|
||||
else process.env.AGENT_INTERNAL_TOKEN = originalInternalToken;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user