Skip to content

Commit aee87c6

Browse files
committed
test: update bundled sidecar fixtures
1 parent 9a35a91 commit aee87c6

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/infra/update-global.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
type CommandRunner,
3434
} from "./update-global.js";
3535

36-
const MATRIX_HELPER_API = bundledDistPluginFile("matrix", "helper-api.js");
36+
const TELEGRAM_RUNTIME_API = bundledDistPluginFile("telegram", "runtime-api.js");
3737
async function writeGlobalPackageJson(packageRoot: string, version = "1.0.0") {
3838
await fs.writeFile(
3939
path.join(packageRoot, "package.json"),
@@ -687,9 +687,9 @@ describe("update global helpers", () => {
687687

688688
await expect(collectInstalledGlobalPackageErrors({ packageRoot })).resolves.toStrictEqual([]);
689689

690-
await fs.rm(path.join(packageRoot, MATRIX_HELPER_API));
690+
await fs.rm(path.join(packageRoot, TELEGRAM_RUNTIME_API));
691691
await expect(collectInstalledGlobalPackageErrors({ packageRoot })).resolves.toContain(
692-
`missing packaged dist file ${MATRIX_HELPER_API}`,
692+
`missing packaged dist file ${TELEGRAM_RUNTIME_API}`,
693693
);
694694

695695
await fs.writeFile(
@@ -796,10 +796,10 @@ describe("update global helpers", () => {
796796
it("verifies legacy sidecars for installed bundled plugins without inventory", async () => {
797797
await withTempDir({ prefix: "openclaw-update-global-legacy-plugin-" }, async (packageRoot) => {
798798
await writeGlobalPackageJson(packageRoot);
799-
await writeBundledPluginPackageJson(packageRoot, "matrix", "@openclaw/matrix");
799+
await writeBundledPluginPackageJson(packageRoot, "telegram", "@openclaw/telegram");
800800

801801
await expect(collectInstalledGlobalPackageErrors({ packageRoot })).resolves.toContain(
802-
`missing bundled runtime sidecar ${MATRIX_HELPER_API}`,
802+
`missing bundled runtime sidecar ${TELEGRAM_RUNTIME_API}`,
803803
);
804804
});
805805
});
@@ -809,11 +809,11 @@ describe("update global helpers", () => {
809809
{ prefix: "openclaw-update-global-critical-sidecars-" },
810810
async (packageRoot) => {
811811
await writeGlobalPackageJson(packageRoot, "2026.4.15");
812-
await writeBundledPluginPackageJson(packageRoot, "matrix", "@openclaw/matrix");
812+
await writeBundledPluginPackageJson(packageRoot, "telegram", "@openclaw/telegram");
813813
await writePackageDistInventory(packageRoot);
814814

815815
await expect(collectInstalledGlobalPackageErrors({ packageRoot })).resolves.toContain(
816-
`missing bundled runtime sidecar ${MATRIX_HELPER_API}`,
816+
`missing bundled runtime sidecar ${TELEGRAM_RUNTIME_API}`,
817817
);
818818
},
819819
);

src/infra/update-runner.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { runGatewayUpdate } from "./update-runner.js";
1212

1313
type CommandResponse = { stdout?: string; stderr?: string; code?: number | null };
1414
type CommandResult = { stdout: string; stderr: string; code: number | null };
15-
const MATRIX_HELPER_API = bundledDistPluginFile("matrix", "helper-api.js");
15+
const TELEGRAM_RUNTIME_API = bundledDistPluginFile("telegram", "runtime-api.js");
1616
const fixtureRootTracker = createSuiteTempRootTracker({ prefix: "openclaw-update-" });
1717

1818
function toCommandResult(response?: CommandResponse): CommandResult {
@@ -1776,10 +1776,10 @@ describe("runGatewayUpdate", () => {
17761776
);
17771777
await writeBundledRuntimeSidecars(pkgRoot);
17781778
const inventory = await writePackageDistInventory(pkgRoot);
1779-
expect(inventory).toContain(MATRIX_HELPER_API);
1780-
const matrixHelperApiPath = path.join(pkgRoot, MATRIX_HELPER_API);
1781-
await expect(pathExists(matrixHelperApiPath)).resolves.toBe(true);
1782-
await fs.rm(matrixHelperApiPath);
1779+
expect(inventory).toContain(TELEGRAM_RUNTIME_API);
1780+
const telegramRuntimeApiPath = path.join(pkgRoot, TELEGRAM_RUNTIME_API);
1781+
await expect(pathExists(telegramRuntimeApiPath)).resolves.toBe(true);
1782+
await fs.rm(telegramRuntimeApiPath);
17831783
},
17841784
});
17851785

@@ -1788,7 +1788,7 @@ describe("runGatewayUpdate", () => {
17881788
expect(result.status).toBe("error");
17891789
expect(result.reason).toBe("global-install-failed");
17901790
expect(result.steps.at(-1)?.stderrTail).toContain(
1791-
`missing packaged dist file ${MATRIX_HELPER_API}`,
1791+
`missing packaged dist file ${TELEGRAM_RUNTIME_API}`,
17921792
);
17931793
});
17941794

0 commit comments

Comments
 (0)