mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 08:43:37 +00:00
test(release): respect stable ClawHub channel
This commit is contained in:
@@ -3,7 +3,10 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { resolveRegistryUpdateChannel } from "../../../infra/update-channels.js";
|
||||
import { resolveNpmInstallSpecsForUpdateChannel } from "../../../plugins/install-channel-specs.js";
|
||||
import {
|
||||
resolveClawHubInstallSpecsForUpdateChannel,
|
||||
resolveNpmInstallSpecsForUpdateChannel,
|
||||
} from "../../../plugins/install-channel-specs.js";
|
||||
import { VERSION } from "../../../version.js";
|
||||
|
||||
function expectedNpmInstallSpec(spec: string): string {
|
||||
@@ -13,6 +16,13 @@ function expectedNpmInstallSpec(spec: string): string {
|
||||
}).installSpec;
|
||||
}
|
||||
|
||||
function expectedClawHubInstallSpec(spec: string): string {
|
||||
return resolveClawHubInstallSpecsForUpdateChannel({
|
||||
spec,
|
||||
updateChannel: resolveRegistryUpdateChannel({ currentVersion: VERSION }),
|
||||
}).installSpec;
|
||||
}
|
||||
|
||||
function expectRecordFields(record: unknown, expected: Record<string, unknown>) {
|
||||
if (!record || typeof record !== "object") {
|
||||
throw new Error("Expected record");
|
||||
@@ -1264,7 +1274,7 @@ describe("repairMissingConfiguredPluginInstalls", () => {
|
||||
});
|
||||
|
||||
expectRecordFields(mockCallArg(mocks.installPluginFromClawHub), {
|
||||
spec: "clawhub:@openclaw/whatsapp",
|
||||
spec: expectedClawHubInstallSpec("clawhub:@openclaw/whatsapp"),
|
||||
env: {
|
||||
OPENCLAW_COMPATIBILITY_HOST_VERSION: "2026.5.19",
|
||||
OPENCLAW_UPDATE_POST_CORE_CONVERGENCE: "1",
|
||||
|
||||
Reference in New Issue
Block a user