Skip to content

Commit dbccc2a

Browse files
committed
test(gateway): move SecretInputs probe auth regression
1 parent da48b76 commit dbccc2a

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

src/gateway/probe-auth.test.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -131,36 +131,6 @@ describe("resolveGatewayProbeAuthSafe", () => {
131131
},
132132
});
133133
});
134-
135-
it("does not resolve remote SecretRefs for local probes", async () => {
136-
const result = await resolveGatewayProbeAuthSafeWithSecretInputs({
137-
cfg: {
138-
gateway: {
139-
mode: "local",
140-
remote: {
141-
url: "wss://gateway.example",
142-
token: { source: "env", provider: "default", id: "REMOTE_GATEWAY_TOKEN" },
143-
},
144-
},
145-
secrets: {
146-
providers: {
147-
default: { source: "env" },
148-
},
149-
},
150-
} as OpenClawConfig,
151-
mode: "local",
152-
env: {
153-
REMOTE_GATEWAY_TOKEN: "remote-token",
154-
} as NodeJS.ProcessEnv,
155-
});
156-
157-
expect(result).toEqual({
158-
auth: {
159-
token: undefined,
160-
password: undefined,
161-
},
162-
});
163-
});
164134
});
165135

166136
describe("resolveGatewayProbeTarget", () => {
@@ -248,6 +218,36 @@ describe("resolveGatewayProbeAuthSafeWithSecretInputs", () => {
248218
expect(result.warning).toContain("gateway.auth.token");
249219
expect(result.warning).toContain("unresolved");
250220
});
221+
222+
it("does not resolve remote SecretRefs for local probes", async () => {
223+
const result = await resolveGatewayProbeAuthSafeWithSecretInputs({
224+
cfg: {
225+
gateway: {
226+
mode: "local",
227+
remote: {
228+
url: "wss://gateway.example",
229+
token: { source: "env", provider: "default", id: "REMOTE_GATEWAY_TOKEN" },
230+
},
231+
},
232+
secrets: {
233+
providers: {
234+
default: { source: "env" },
235+
},
236+
},
237+
} as OpenClawConfig,
238+
mode: "local",
239+
env: {
240+
REMOTE_GATEWAY_TOKEN: "remote-token",
241+
} as NodeJS.ProcessEnv,
242+
});
243+
244+
expect(result).toEqual({
245+
auth: {
246+
token: undefined,
247+
password: undefined,
248+
},
249+
});
250+
});
251251
});
252252

253253
describe("resolveGatewayProbeAuthWithSecretInputs", () => {

0 commit comments

Comments
 (0)