mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:50:43 +00:00
test(plugins): expose discord onboarding lane
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DEFAULT_LIVE_RETRIES,
|
||||
@@ -8,6 +9,9 @@ import {
|
||||
import { BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS } from "../../scripts/lib/docker-e2e-scenarios.mjs";
|
||||
|
||||
const orderLanes = <T>(lanes: T[]) => lanes;
|
||||
const packageJson = JSON.parse(readFileSync("package.json", "utf8")) as {
|
||||
scripts?: Record<string, string>;
|
||||
};
|
||||
|
||||
function planFor(
|
||||
overrides: Partial<Parameters<typeof resolveDockerE2ePlan>[0]> = {},
|
||||
@@ -240,6 +244,25 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps planned pnpm docker lanes backed by package scripts", () => {
|
||||
const plan = planFor({
|
||||
includeOpenWebUI: true,
|
||||
planReleaseAll: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
});
|
||||
const scripts = packageJson.scripts ?? {};
|
||||
const missing = plan.lanes
|
||||
.flatMap((lane) =>
|
||||
Array.from(lane.command.matchAll(/\bpnpm\s+(test:docker:[\w:-]+)/gu), (match) => ({
|
||||
lane: lane.name,
|
||||
script: match[1],
|
||||
})),
|
||||
)
|
||||
.filter(({ script }) => !scripts[script]);
|
||||
|
||||
expect(missing).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps legacy release chunk names as aggregate aliases", () => {
|
||||
const packageUpdate = planFor({
|
||||
includeOpenWebUI: true,
|
||||
|
||||
Reference in New Issue
Block a user