test(plugins): expose discord onboarding lane

This commit is contained in:
Vincent Koc
2026-05-03 02:20:27 -07:00
parent bdf91fab9c
commit 2a1c6cf179
3 changed files with 25 additions and 0 deletions

View File

@@ -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,