fix(test): route qa otel smoke parser

This commit is contained in:
Vincent Koc
2026-06-21 18:23:44 +02:00
parent b47c930e7e
commit d3c907193f
4 changed files with 21 additions and 1 deletions

View File

@@ -2040,6 +2040,10 @@ const SOURCE_TEST_TARGETS = new Map([
"test/helpers/agents/happy-path-prompt-snapshots.ts",
HAPPY_PATH_PROMPT_SNAPSHOT_HELPER_TEST_TARGETS,
],
[
"test/e2e/qa-lab/runtime/qa-otel-smoke-runtime.ts",
["test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts"],
],
["src/plugins/runtime-sidecar-paths-baseline.ts", RUNTIME_SIDECAR_BASELINE_OWNER_TEST_TARGETS],
["src/plugins/runtime-sidecar-paths.ts", RUNTIME_SIDECAR_PATH_CONSUMER_TEST_TARGETS],
["ui/config/control-ui-chunking.ts", ["ui/src/ui/control-ui-chunking.test.ts"]],

View File

@@ -242,7 +242,7 @@ function parseArgs(argv: string[]): CliOptions {
}
const readValue = () => {
const value = args[index + 1]?.trim();
if (!value) {
if (!value || value.startsWith("-")) {
throw new Error(`${arg} requires a value`);
}
index += 1;

View File

@@ -135,6 +135,18 @@ describe("qa-otel-smoke receiver bounds", () => {
});
});
it.each([
["--collector", ["--collector", "--logs-exporter"]],
["--logs-exporter", ["--logs-exporter", "--collector"]],
["--output-dir", ["--output-dir", "--collector"]],
["--provider-mode", ["--provider-mode", "--collector"]],
["--scenario", ["--scenario", "--collector"]],
["--model", ["--model", "--collector"]],
["--alt-model", ["--alt-model", "--collector"]],
])("rejects missing values for %s before shifting parser state", (flag, args) => {
expect(() => testing.parseArgs(args)).toThrow(`${flag} requires a value`);
});
it("selects the matching scenario for the requested log exporter", () => {
expect(testing.parseArgs(["--logs-exporter", "otlp"]).scenarioId).toBe("otel-trace-smoke");
expect(testing.parseArgs(["--logs-exporter", "stdout"]).scenarioId).toBe(

View File

@@ -439,6 +439,10 @@ describe("scripts/test-projects changed-target routing", () => {
"scripts/e2e/lib/openwebui/http-probe.mjs",
["test/e2e/qa-lab/runtime/openwebui-probe.e2e.test.ts"],
],
[
"test/e2e/qa-lab/runtime/qa-otel-smoke-runtime.ts",
["test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts"],
],
["scripts/e2e/lib/text-file-utils.mjs", ["test/scripts/e2e-text-file-utils.test.ts"]],
[
"scripts/e2e/lib/plugins/npm-registry-server.mjs",