Skip to content

Commit 771b22a

Browse files
committed
test: fold otel smoke into qa e2e
1 parent 57e7d0c commit 771b22a

5 files changed

Lines changed: 39 additions & 2 deletions

File tree

extensions/qa-lab/src/scenario-catalog.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ describe("qa scenario catalog", () => {
5858
"control-ui-chat-flow-playwright",
5959
"package-openclaw-for-docker",
6060
"plugin-lifecycle-probe",
61+
"qa-otel-smoke",
6162
].toSorted(),
6263
);
6364
expect(
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
title: QA OTEL smoke evidence
2+
3+
scenario:
4+
id: qa-otel-smoke
5+
surface: telemetry
6+
coverage:
7+
primary:
8+
- telemetry.otel
9+
secondary:
10+
- harness.qa-lab
11+
- plugin-sdk-diagnostic-runtime-exports
12+
objective: Exercise bounded local OTLP capture and OpenTelemetry smoke assertions through QA Lab evidence.
13+
successCriteria:
14+
- Package-manager forwarded QA OTEL smoke arguments parse correctly.
15+
- Body-size limits are strict positive integers.
16+
- Local OTLP receiver rejects malformed, oversized, or truncated protobuf payloads with bounded diagnostics.
17+
- Captured OTLP body text is bounded and leak needles remain detectable.
18+
- Active local receiver sockets close during cleanup.
19+
- Smoke assertions fail on non-2xx OTLP requests and missing release-critical signals.
20+
docsRefs:
21+
- docs/gateway/opentelemetry.md
22+
- docs/concepts/qa-e2e-automation.md
23+
codeRefs:
24+
- test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts
25+
execution:
26+
kind: vitest
27+
path: test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts
28+
summary: Vitest coverage for QA OTEL smoke receiver bounds and signal assertions.

scripts/test-projects.test-support.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
664664
["scripts/test-projects.test-support.d.mts", ["test/scripts/test-projects.test.ts"]],
665665
["scripts/test-projects.test-support.mjs", ["test/scripts/test-projects.test.ts"]],
666666
["scripts/tsdown-build.mjs", ["test/scripts/tsdown-build.test.ts"]],
667+
["scripts/qa-otel-smoke.ts", ["test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts"]],
667668
["scripts/bundled-plugin-assets.mjs", ["test/scripts/bundled-plugin-assets.test.ts"]],
668669
["scripts/bundle-a2ui.mjs", ["test/scripts/bundled-plugin-assets.test.ts"]],
669670
["scripts/build-diffs-viewer-runtime.mjs", ["test/scripts/build-diffs-viewer-runtime.test.ts"]],

test/scripts/qa-otel-smoke.test.ts renamed to test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Qa Otel Smoke tests cover qa otel smoke script behavior.
1+
// QA OTEL Smoke tests cover QA Lab telemetry evidence.
22
import { spawn, spawnSync } from "node:child_process";
33
import { EventEmitter } from "node:events";
44
import { existsSync, mkdirSync, mkdtempSync, rmSync, statSync } from "node:fs";
@@ -8,7 +8,7 @@ import path from "node:path";
88
import { setTimeout as delay } from "node:timers/promises";
99
import { gzipSync } from "node:zlib";
1010
import { beforeAll, describe, expect, it, vi } from "vitest";
11-
import { testing } from "../../scripts/qa-otel-smoke.ts";
11+
import { testing } from "../../../../scripts/qa-otel-smoke.ts";
1212

1313
describe("qa-otel-smoke receiver bounds", () => {
1414
let configuredBodyLimitLoad: ReturnType<typeof spawnSync>;

test/scripts/test-projects.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,13 @@ describe("scripts/test-projects changed-target routing", () => {
641641
}
642642
});
643643

644+
it("keeps QA Lab OTEL script edits on QA e2e tests", () => {
645+
expect(resolveChangedTestTargetPlan(["scripts/qa-otel-smoke.ts"])).toEqual({
646+
mode: "targets",
647+
targets: ["test/e2e/qa-lab/runtime/qa-otel-smoke.e2e.test.ts"],
648+
});
649+
});
650+
644651
it("keeps shared script library edits on owner tests", () => {
645652
const expectedTargets = new Map([
646653
[

0 commit comments

Comments
 (0)