bun test v1.4.4 (38afee6c8)
$ bun test student-tests/security-guards.test.ts student-tests/kv-secrets.test.ts student-tests/public-endpoint.test.ts student-tests/operator-crypto.test.ts student-tests/pki.test.ts student-tests/grpc-probe.test.ts student-tests/transport-negative.test.ts student-tests/command-runner.test.ts student-tests/checkpoint-guards.test.ts student-tests/openobserve-topology.test.ts student-tests/openobserve-config.test.ts student-tests/openobserve-accounts.test.ts student-tests/openobserve-request-path.test.ts student-tests/openobserve-response.test.ts student-tests/openobserve-search-window.test.ts student-tests/openobserve-reader.test.ts student-tests/openobserve-account-workflow.test.ts student-tests/grafana-guards.test.ts student-tests/grafana-datasources.test.ts student-tests/http-fixture.test.ts

student-tests/grafana-datasources.test.ts:
(pass) native listDTO may omit auth fields; authenticate the exact UID detail and health readers [0.43ms]
(pass) configured root account is rejected before datasource health can masquerade as scoped auth [0.12ms]
(pass) HTTP200 health with error body is not a healthy datasource [0.07ms]

student-tests/openobserve-response.test.ts:
(pass) HTTP401 text error preserves native HTTP outcome [0.07ms]
(pass) HTTP422 text error preserves native HTTP outcome
(pass) HTTP500 text error preserves native HTTP outcome
(pass) HTTP200 JSON remains parsed [0.02ms]
(pass) HTTP200 malformed success retains the status in its error [0.02ms]

student-tests/http-fixture.test.ts:
(pass) human fixture labels never become invalid API usernames [0.08ms]
(pass) unexpected native HTTP result retains its exact outcome before stable failure [0.37ms]
(pass) diagnostic write failure cannot replace HTTP400 [0.07ms]

student-tests/openobserve-account-workflow.test.ts:
(pass) saved native200 and403 accounts publish only after both account controls [0.31ms]
(pass) positive HTTP401 cannot publish derived credentials [0.06ms]
(pass) positive HTTP503 cannot publish derived credentials [0.01ms]
(pass) positive HTTP201 cannot publish derived credentials [0.01ms]
(pass) unexpected deny HTTP200 cannot publish derived credentials [0.05ms]
(pass) unexpected deny HTTP503 cannot publish derived credentials [0.01ms]
(pass) invalid saved query shape user cannot publish or probe [0.06ms]
(pass) invalid saved query shape user cannot publish or probe
(pass) invalid saved query shape token cannot publish or probe
(pass) invalid saved query shape token cannot publish or probe
(pass) extra owner slot never reaches credential publication [0.05ms]
(pass) workflow requires explicit native and publishing ports [0.03ms]
(pass) invalid query token after a healthy ingest control still cannot publish any derived file [0.07ms]

student-tests/openobserve-config.test.ts:
(pass) Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics [0.31ms]
(pass) Grafana queries measured native metric names without legacy namespace or invented suffixes [0.34ms]
(pass) Grafana native plugin provisioning uses measured fields and native Basic auth consumers [19.65ms]
(pass) Grafana mounts native alert rules using the measured datasource and metric names [0.43ms]

student-tests/pki.test.ts:
(pass) issued leaf verifies exact SAN, issuer, validity and matching key [681.18ms]

student-tests/openobserve-accounts.test.ts:
(pass) native service-account success saves exact credential before returning without a human-user API [0.24ms]
(pass) native HTTP401 never publishes an account [0.06ms]
(pass) native HTTP403 never publishes an account [0.01ms]
(pass) native HTTP500 never publishes an account
(pass) invalid native result fails closed code 3 [0.06ms]
(pass) invalid native result fails closed token 0 [0.01ms]
(pass) invalid native result fails closed token 4097
(pass) invalid native result fails closed user 23
(pass) invalid native result fails closed token 4
(pass) account persistence failure stays primary and prevents a success result [0.10ms]

student-tests/checkpoint-guards.test.ts:
(pass) checkpoint second snapshot rejects changed bytes, additions and removals [0.15ms]
(pass) historical evidence never replaces existing different bytes and permits exact identical bytes [0.20ms]
(pass) handover lease rejects a different valid source generation after initial verification [0.44ms]
(pass) handover lease rejects source mutation even when receipt is unchanged [0.12ms]
(pass) historical finalization requires its accepted source and build generation binding [0.13ms]

student-tests/kv-secrets.test.ts:
(pass) reads the native KVv2 envelope for api [0.18ms]
(pass) reads the native KVv2 envelope for worker [0.02ms]
(pass) rejects missing KVv2 nesting and required fields [0.05ms]
(pass) rejects credentials for another role [0.02ms]
(pass) rejects invalid metadata and denied responses [0.04ms]

student-tests/grafana-guards.test.ts:
(pass) Grafana endpoint uses the verified published loopback binding despite two networks [0.11ms]
(pass) Grafana endpoint rejects foreign, stopped, wildcard, missing and ambiguous bindings [0.10ms]
(pass) real numeric zero is a valid metric sample [0.11ms]
(pass) HTTP200 with datasource error, empty, null, nonfinite or ragged values cannot pass [0.08ms]
(pass) native history first creation binds exact collection and user key [0.05ms]
(pass) existing native history uses versioned PATCH at the same owned key [0.02ms]
(pass) native Grafana evaluator key reordering does not change a rule [0.14ms]

student-tests/openobserve-request-path.test.ts:
(pass) native URLSearchParams PromQL spaces stay valid before any credential or process port [0.09ms]
(pass) rejects invalid request URI "https://foreign/api/default/streams" [0.02ms]
(pass) rejects invalid request URI "/api/foreign/streams"
(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"
(pass) pinned plugin organization editor endpoint remains available [0.02ms]

student-tests/openobserve-search-window.test.ts:
(pass) actual fractional filesystem mtime serializes native integer microseconds [0.05ms]
(pass) invalid search window NaN 1 fails before a native call [0.02ms]
(pass) invalid search window 1 Infinity fails before a native call
(pass) invalid search window -1 100 fails before a native call
(pass) invalid search window 1 1.7976931348623157e+308 fails before a native call
(pass) invalid search window 10 1 fails before a native call
(pass) invalid search window 1 1 fails before a native call
(pass) invalid search window 1 3600002 fails before a native call

student-tests/openobserve-topology.test.ts:
(pass) telemetry storage is a single OpenObserve instead of Prometheus Loki Tempo and their gateways [0.49ms]
(pass) OpenObserve has its own persistent data and a closed private gateway namespace [0.06ms]
(pass) storage migration retains required neighbors and existing app OTLP contract without OpenObserve secrets [0.13ms]
(pass) Collector and Grafana storage transport targets OpenObserve through the verified gateway [0.14ms]
(pass) Grafana query gateway permits actual editor metadata and guards native request fields [0.05ms]
(pass) Grafana can use an own verified immutable cache alias without changing the canonical image pin [0.07ms]
(pass) Grafana uses its own file-delivered encryption key and secure HTTPS cookies [0.06ms]
(pass) Grafana cannot fetch extra plugin packages outside the approved cached artifacts [0.03ms]

student-tests/command-runner.test.ts:
(pass) secondary diagnostic failures cannot replace command exit and both receipt writers are attempted [0.19ms]
(pass) successful and explicitly allowed command outcomes are returned without diagnostic writes [0.09ms]
(pass) runner requires explicit fake ports and preserves primary execution error [0.06ms]

student-tests/operator-crypto.test.ts:
(pass) operator envelope authenticates ciphertext and hides plaintext [103.05ms]
(pass) operator envelope requires a sufficiently long passphrase [0.04ms]

student-tests/public-endpoint.test.ts:
(pass) selects the actual published loopback listener despite two LB networks [0.09ms]
(pass) rejects invalid published ports [0.05ms]
(pass) rejects unpublished, public, stopped and foreign-resource endpoints [0.06ms]

student-tests/transport-negative.test.ts:
(pass) Bun native certificate-required alert counts as client denial while timeout never does [0.46ms]

student-tests/security-guards.test.ts:
(pass) age rejects future, invalid and stale receipts [0.06ms]
(pass) client role requires exact allowlist membership [0.04ms]
(pass) network endpoints require TLS and an exact intended hostname [0.05ms]

student-tests/grpc-probe.test.ts:
(pass) native HTTP2 gRPC probe requires a valid Export response and checks request framing [285.12ms]

student-tests/openobserve-reader.test.ts:
(pass) reader produces fixed historical SQL end and the same PromQL time after three hours [0.83ms]
(pass) fresh reader default uses the explicit clock for both native request forms [0.18ms]
(pass) reader requires explicit native request and clock ports [0.02ms]

 95 pass
 0 fail
 287 expect() calls
Ran 95 tests across 20 files. [1156.00ms]
