mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-07 07:58:36 +00:00
test: add upgrade survivor package lane
This commit is contained in:
@@ -161,6 +161,26 @@ describe("openclaw test state", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("creates upgrade survivor fixture state", async () => {
|
||||
await withOpenClawTestState(
|
||||
{
|
||||
scenario: "upgrade-survivor",
|
||||
},
|
||||
async (state) => {
|
||||
const config = JSON.parse(await fs.readFile(state.configPath, "utf8"));
|
||||
expect(config).toMatchObject({
|
||||
update: {
|
||||
channel: "stable",
|
||||
},
|
||||
plugins: {
|
||||
enabled: true,
|
||||
allow: ["discord", "telegram", "whatsapp", "memory"],
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps external-service env scoped to the fixture", async () => {
|
||||
const previousPolicy = process.env.OPENCLAW_SERVICE_REPAIR_POLICY;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ export type OpenClawTestStateScenario =
|
||||
| "empty"
|
||||
| "minimal"
|
||||
| "update-stable"
|
||||
| "upgrade-survivor"
|
||||
| "gateway-loopback"
|
||||
| "external-service";
|
||||
|
||||
@@ -133,6 +134,33 @@ function scenarioConfig(options: OpenClawTestStateOptions): Record<string, unkno
|
||||
plugins: {},
|
||||
};
|
||||
}
|
||||
if (scenario === "upgrade-survivor") {
|
||||
return {
|
||||
update: {
|
||||
channel: "stable",
|
||||
},
|
||||
gateway: {
|
||||
port: options.gateway?.port ?? 18789,
|
||||
bind: "loopback",
|
||||
auth: {
|
||||
mode: "token",
|
||||
token: options.gateway?.token ?? "openclaw-test-token",
|
||||
},
|
||||
controlUi: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
enabled: true,
|
||||
allow: ["discord", "telegram", "whatsapp", "memory"],
|
||||
entries: {
|
||||
discord: { enabled: true },
|
||||
telegram: { enabled: true },
|
||||
whatsapp: { enabled: true },
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
if (scenario === "gateway-loopback") {
|
||||
return {
|
||||
gateway: {
|
||||
|
||||
Reference in New Issue
Block a user