mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 00:50:42 +00:00
test: add upgrade survivor package lane
This commit is contained in:
@@ -174,6 +174,7 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
"npm-onboard-channel-agent",
|
||||
"doctor-switch",
|
||||
"update-channel-switch",
|
||||
"upgrade-survivor",
|
||||
]);
|
||||
expect(packageUpdateCore.lanes).toEqual(
|
||||
expect.arrayContaining([
|
||||
@@ -189,6 +190,10 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
name: "update-channel-switch",
|
||||
stateScenario: "update-stable",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: "upgrade-survivor",
|
||||
stateScenario: "upgrade-survivor",
|
||||
}),
|
||||
]),
|
||||
);
|
||||
expect(pluginsRuntimePlugins.lanes.map((lane) => lane.name)).toEqual(["plugins"]);
|
||||
@@ -394,6 +399,7 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
"bundled-channel-setup-entry",
|
||||
"bundled-plugin-install-uninstall-0",
|
||||
"update-channel-switch",
|
||||
"upgrade-survivor",
|
||||
],
|
||||
});
|
||||
|
||||
@@ -474,6 +480,10 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
name: "update-channel-switch",
|
||||
stateScenario: "update-stable",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: "upgrade-survivor",
|
||||
stateScenario: "upgrade-survivor",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -109,6 +109,52 @@ describe("scripts/lib/openclaw-test-state", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("creates the upgrade survivor scenario", async () => {
|
||||
const { stdout } = await execFileAsync(process.execPath, [
|
||||
scriptPath,
|
||||
"--",
|
||||
"create",
|
||||
"--label",
|
||||
"upgrade-survivor",
|
||||
"--scenario",
|
||||
"upgrade-survivor",
|
||||
"--json",
|
||||
]);
|
||||
const payload = JSON.parse(stdout);
|
||||
try {
|
||||
expect(payload.scenario).toBe("upgrade-survivor");
|
||||
expect(payload.config).toMatchObject({
|
||||
update: {
|
||||
channel: "stable",
|
||||
},
|
||||
gateway: {
|
||||
auth: {
|
||||
token: {
|
||||
id: "GATEWAY_AUTH_TOKEN_REF",
|
||||
source: "env",
|
||||
},
|
||||
},
|
||||
},
|
||||
channels: {
|
||||
discord: {
|
||||
enabled: true,
|
||||
dm: {
|
||||
policy: "allowlist",
|
||||
},
|
||||
},
|
||||
telegram: {
|
||||
enabled: true,
|
||||
},
|
||||
whatsapp: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
} finally {
|
||||
await fs.rm(payload.root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("renders a reusable Docker shell function", async () => {
|
||||
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-test-state-function-"));
|
||||
const snippetFile = path.join(tempRoot, "state-function.sh");
|
||||
|
||||
@@ -41,6 +41,7 @@ describe("package acceptance workflow", () => {
|
||||
expect(workflow).toContain("suite_profile:");
|
||||
expect(workflow).toContain("npm-onboard-channel-agent gateway-network config-reload");
|
||||
expect(workflow).toContain("npm-onboard-channel-agent doctor-switch");
|
||||
expect(workflow).toContain("update-channel-switch upgrade-survivor");
|
||||
expect(workflow).toContain("bundled-channel-deps-compat");
|
||||
expect(workflow).toContain("plugins-offline plugin-update");
|
||||
expect(workflow).toContain("include_release_path_suites=true");
|
||||
|
||||
Reference in New Issue
Block a user