Running as unit: run-p128095-i25301382.scope; invocation ID: f5d474bcfba84478bffd41631d645c0c bun test v1.4.4 (38afee6c8) student-tests/openobserve-request-path.test.ts: 1 | import {test,expect} from "bun:test"; 2 | import {validateOpenObservePath} from "../scripts/openobserve-request-path"; 3 | test("native URLSearchParams PromQL spaces stay valid before any credential or process port",()=>{ 4 | const path="/api/default/prometheus/api/v1/query?"+new URLSearchParams({query:"histogram_quantile(0.95,sum by(le)(http_duration_bucket))"}); 5 | expect(()=>validateOpenObservePath(path)).not.toThrow(); ^ error: expect(received).not.toThrow() Error name: "Error" Error message: "INVALID_OPENOBSERVE_REQUEST_PATH" at (/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/student-tests/openobserve-request-path.test.ts:5:48) (fail) native URLSearchParams PromQL spaces stay valid before any credential or process port [0.84ms] (pass) rejects invalid request URI "https://foreign/api/default/streams" [0.05ms] (pass) rejects invalid request URI "/api/foreign/streams" [0.01ms] (pass) rejects invalid request URI "/api/default/streams\r\nX: bad" (pass) rejects invalid request URI "/api/default/_search#fragment" (pass) rejects invalid request URI "/api/default/space in path" 5 pass 1 fail 6 expect() calls Ran 6 tests across 1 file. [5.00ms]