From 354a6ddefdaf2cbaf1f279f387fbe8032884fbbc Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 06:10:59 +0100 Subject: [PATCH] test: check minted gateway token format --- src/cli/daemon-cli/install.integration.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cli/daemon-cli/install.integration.test.ts b/src/cli/daemon-cli/install.integration.test.ts index 0f7a387ea0a..dc7a35859a8 100644 --- a/src/cli/daemon-cli/install.integration.test.ts +++ b/src/cli/daemon-cli/install.integration.test.ts @@ -156,8 +156,7 @@ describe("runDaemonInstall integration", () => { const updated = await readJson(configPath); const gateway = (updated.gateway ?? {}) as { auth?: { token?: string } }; const persistedToken = gateway.auth?.token; - expect(typeof persistedToken).toBe("string"); - expect((persistedToken ?? "").length).toBeGreaterThan(0); + expect(persistedToken).toEqual(expect.stringMatching(/^[0-9a-f]{48}$/)); const installEnv = serviceMock.install.mock.calls[0]?.[0]?.environment; expect(installEnv?.OPENCLAW_GATEWAY_TOKEN).toBeUndefined();