Files
mtusi2026lab7/evidence/openobserve/config-red.txt

54 lines
2.9 KiB
Plaintext

Running as unit: run-p4086343-i25052100.scope; invocation ID: 2e572632b49c480ca26b9feea1f53cfb
bun test v1.4.4 (38afee6c8)
student-tests/openobserve-config.test.ts:
6 | test("Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics", async () => {
7 | const config = Bun.YAML.parse(await readFile(resolve(root,"infra/otel/collector.yaml"),"utf8")) as any;
8 | const logs = config.exporters[config.service.pipelines.logs.exporters[0]];
9 | const traces = config.exporters[config.service.pipelines.traces.exporters[0]];
10 | const metrics = config.exporters[config.service.pipelines.metrics.exporters[0]];
11 | expect(logs.headers).toBeDefined();
^
error: expect(received).toBeDefined()
Received: undefined
at <anonymous> (/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/student-tests/openobserve-config.test.ts:11:24)
(fail) Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics [0.55ms]
22 | });
23 |
24 | test("Grafana queries measured native metric names without legacy namespace or invented suffixes", async () => {
25 | const dashboard=JSON.parse(await readFile(resolve(root,"infra/grafana/dashboards/messenger.json"),"utf8"));
26 | const expressions=dashboard.panels.flatMap((p:any)=>p.targets.map((t:any)=>t.expr));
27 | expect(expressions).toContain("sum(rate(http_requests[1m]))");
^
error: expect(received).toContain(expected)
Expected to contain: "sum(rate(http_requests[1m]))"
Received: [ "sum(rate(messenger_http_requests_total[1m]))", "histogram_quantile(0.95,sum by (le)(rate(messenger_http_duration_seconds_bucket[1m])))",
"sum by (outcome)(rate(messenger_jobs_processed_total[1m]))", "histogram_quantile(0.95,sum by(le)(rate(messenger_job_duration_seconds_bucket[1m])))",
"histogram_quantile(0.95,sum by(le)(rate(messenger_time_to_ready_seconds_bucket[1m])))",
"max(messenger_queue_oldest_age_seconds)"
]
at <anonymous> (/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/student-tests/openobserve-config.test.ts:27:23)
(fail) Grafana queries measured native metric names without legacy namespace or invented suffixes [0.44ms]
30 | });
31 |
32 | test("Grafana native plugin provisioning uses measured fields and native Basic auth consumers", async () => {
33 | const config=Bun.YAML.parse(await readFile(resolve(root,"infra/grafana/provisioning/datasources/default.yaml"),"utf8")) as any;
34 | const plugin=config.datasources.find((d:any)=>d.type==="openobserve");
35 | expect(plugin).toBeDefined();
^
error: expect(received).toBeDefined()
Received: undefined
at <anonymous> (/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/student-tests/openobserve-config.test.ts:35:18)
(fail) Grafana native plugin provisioning uses measured fields and native Basic auth consumers [0.23ms]
0 pass
3 fail
3 expect() calls
Ran 3 tests across 1 file. [9.00ms]