
























@@ -38,6 +38,17 @@ function emptyAuthStore(): AuthProfileStore {
3838return { version: 1, profiles: {} };
3939}
404041+function requireGatewayAuth(
42+snapshot: Awaited<ReturnType<typeof import("./runtime.js").prepareSecretsRuntimeSnapshot>>,
43+) {
44+const auth = snapshot.config.gateway?.auth;
45+expect(auth).toBeDefined();
46+if (!auth) {
47+throw new Error("expected gateway auth config");
48+}
49+return auth;
50+}
51+4152describe("secrets runtime fast path", () => {
4253afterEach(() => {
4354runtimePrepareImportMock.mockClear();
@@ -67,7 +78,7 @@ describe("secrets runtime fast path", () => {
6778});
68796980expect(runtimePrepareImportMock).not.toHaveBeenCalled();
70-expect(snapshot.config.gateway?.auth?.token).toBe("plain-startup-token");
81+expect(requireGatewayAuth(snapshot).token).toBe("plain-startup-token");
7182expect(snapshot.authStores).toEqual([
7283{
7384agentDir: "/tmp/openclaw-agent-main",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。