mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
3c06621e3b
* perf(test): collapse core tooling runtime proofs * fix(test): import OTEL span id guard
26 lines
1.0 KiB
TypeScript
26 lines
1.0 KiB
TypeScript
import fs from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
import { parseGatewayStabilityRuntimeOptions } from "./gateway-stability-runtime-contract.js";
|
|
|
|
describe("gateway stability runtime CLI", () => {
|
|
it("keeps the full operator workflow in the QA script scenario", () => {
|
|
const scenario = fs.readFileSync(
|
|
"qa/scenarios/observability/gateway-stability-runtime.yaml",
|
|
"utf8",
|
|
);
|
|
expect(scenario).toContain("kind: script");
|
|
expect(scenario).toContain("path: test/e2e/qa-lab/runtime/gateway-stability-runtime.ts");
|
|
});
|
|
|
|
it("requires one bounded artifact destination", () => {
|
|
expect(parseGatewayStabilityRuntimeOptions(["--artifact-base", "artifacts"], "/repo")).toEqual({
|
|
artifactBase: "/repo/artifacts",
|
|
repoRoot: "/repo",
|
|
});
|
|
expect(() => parseGatewayStabilityRuntimeOptions([])).toThrow("--artifact-base is required");
|
|
expect(() => parseGatewayStabilityRuntimeOptions(["--artifact-base", "--other"])).toThrow(
|
|
"--artifact-base requires a value",
|
|
);
|
|
});
|
|
});
|