mirror of
https://github.com/morluto/rea.git
synced 2026-12-04 19:41:20 -05:00
test(artifacts): use the file MCP session for malformed POM cases
The malformed-POM cases kept their own lazy MCP session beside the file's shared one, so the file still started two servers. They now use the shared session, and the superseded owner and its import are gone. Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
@@ -7,10 +7,6 @@ import { MAVEN_GRADLE_METADATA_TOOL_CONTRACTS } from "../../src/contracts/java/m
|
||||
import { SESSION_TOOL_CONTRACTS } from "../../src/contracts/sessionToolContracts.js";
|
||||
import { parseEvidenceBundle } from "../../src/domain/evidenceBundle.js";
|
||||
import { parseMcpToolError } from "../fixtures/mcpToolError.js";
|
||||
import {
|
||||
connectLocalToolsMcp,
|
||||
lazyLocalToolsMcp,
|
||||
} from "../fixtures/localToolsMcp.js";
|
||||
import {
|
||||
gradleModuleFixture,
|
||||
mavenPomFixture,
|
||||
@@ -628,8 +624,6 @@ cliTest(
|
||||
},
|
||||
);
|
||||
|
||||
const malformedPomMcp = lazyLocalToolsMcp();
|
||||
|
||||
cliTest.for([
|
||||
{
|
||||
label: "invalid XML syntax",
|
||||
@@ -674,7 +668,8 @@ cliTest.for([
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject(expected);
|
||||
const { call } = await malformedPomMcp();
|
||||
const call = await cli.sharedMcpCall?.();
|
||||
if (call === undefined) throw new Error("Expected a stdio MCP session");
|
||||
const response = await call("inspect_maven_gradle_metadata", { path });
|
||||
expect(parseMcpToolError(response).error).toMatchObject(expected);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user