mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
test(setup): use verified invocations in uninstall fixtures
Update byte-preservation fixtures for the fail-closed command ownership contract. Unknown path retention remains covered. Validation: both filesystem boundary files pass, including BOM restoration and idempotent removal.
This commit is contained in:
1 parent
ffeb2d4367
commit
a154b9752c
2 files changed
+7
-4
No files matched your search
@@ -16,6 +16,7 @@ import {
|
||||
} from "../../../src/application/SetupClientConfiguration.js";
|
||||
import { systemUninstallHost } from "../../../src/application/Uninstall.js";
|
||||
import { supportedClients } from "../../../src/application/SupportedClients.js";
|
||||
import { CURRENT_ENTRYPOINT_PATH } from "../../../src/process/CurrentEntrypointPath.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
|
||||
describe.each([
|
||||
@@ -137,8 +138,10 @@ it("restores original BOM-prefixed JSONC bytes after update and removal", async
|
||||
await mkdir(dirname(client.configPath), { recursive: true });
|
||||
await writeFile(client.configPath, original);
|
||||
|
||||
const firstCommand = [join(home, "bin", "rea"), "mcp"];
|
||||
const updatedCommand = [join(home, "updated", "bin", "rea"), "mcp"];
|
||||
if (CURRENT_ENTRYPOINT_PATH === undefined)
|
||||
throw new Error("test runner entrypoint is unavailable");
|
||||
const firstCommand = ["rea", "mcp"];
|
||||
const updatedCommand = [process.execPath, CURRENT_ENTRYPOINT_PATH, "mcp"];
|
||||
expect(
|
||||
await configureClientConfiguration(client, {}, firstCommand),
|
||||
).toMatchObject({ status: "configured" });
|
||||
|
||||
@@ -1335,7 +1335,7 @@ describe("Codex configuration comments", () => {
|
||||
await configureClientConfiguration(
|
||||
{ name: "codex", configPath, format: "toml" },
|
||||
{},
|
||||
["/isolated prefix/bin/rea", "mcp"],
|
||||
[PRODUCT_IDENTITY.cliBinary, "mcp"],
|
||||
),
|
||||
).toMatchObject({ status: "configured" });
|
||||
const configured = await readFile(configPath, "utf8");
|
||||
@@ -1505,7 +1505,7 @@ describe("client configuration filesystem removal", () => {
|
||||
cursor,
|
||||
JSON.stringify({
|
||||
mcpServers: {
|
||||
rea: { command: "/isolated prefix/bin/rea", args: ["mcp"] },
|
||||
rea: { command: PRODUCT_IDENTITY.cliBinary, args: ["mcp"] },
|
||||
other: { command: "other" },
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user