From 9bef4b19d4a03ff7c8cbd65fcb977c1f8a42f04a Mon Sep 17 00:00:00 2001 From: gtxy27 <296810423@qq.com> Date: Wed, 12 Aug 2026 10:45:25 +0800 Subject: [PATCH] test: use canonical API key ID --- tests/option-runtime.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/option-runtime.test.ts b/tests/option-runtime.test.ts index 4671884..bbc6046 100644 --- a/tests/option-runtime.test.ts +++ b/tests/option-runtime.test.ts @@ -26,6 +26,7 @@ import { isOtelActive, setupOtel } from "../src/setup"; import { withSpan as withMainSpan } from "../src/with-span"; const ENDPOINT = "http://collector.internal:4318"; +const API_KEY_ID = "pho_sk_01h455vb4pex5vsknk084sn02s"; const TRACEPARENT_HEADER = "photon-developer-traceparent"; const SPAN_ID_PATTERN = /^[0-9a-f]{16}$/u; const TRACE_ID_PATTERN = /^[0-9a-f]{32}$/u; @@ -168,7 +169,7 @@ describe("option runtime", () => { await runtime.withActiveSpan( "developer.http", { - attributes: { "photon.api_key.id": "pho_sk_test" }, + attributes: { "photon.api_key.id": API_KEY_ID }, kind: SpanKind.SERVER, parentContext: ROOT_CONTEXT, }, @@ -181,7 +182,7 @@ describe("option runtime", () => { const [server] = spanExporter.getFinishedSpans(); expect(server?.kind).toBe(SpanKind.SERVER); expect(server?.parentSpanContext).toBeUndefined(); - expect(server?.attributes["photon.api_key.id"]).toBe("pho_sk_test"); + expect(server?.attributes["photon.api_key.id"]).toBe(API_KEY_ID); expect(callbackSpanId).toBe(server?.spanContext().spanId); await runtime.shutdown(); });