diff --git a/server/src/__tests__/tool-gateway.test.ts b/server/src/__tests__/tool-gateway.test.ts index af90d1bc1e2..caf1acdf53e 100644 --- a/server/src/__tests__/tool-gateway.test.ts +++ b/server/src/__tests__/tool-gateway.test.ts @@ -33,6 +33,7 @@ import { const embeddedPostgresSupport = await getEmbeddedPostgresTestSupport(); const describeEmbeddedPostgres = embeddedPostgresSupport.supported ? describe : describe.skip; +const originalToolActionSigningSecret = process.env.PAPERCLIP_TOOL_ACTION_SIGNING_SECRET; type Db = ReturnType; @@ -147,6 +148,7 @@ describeEmbeddedPostgres("tool gateway acceptance", () => { let tempDb: Awaited> | null = null; beforeAll(async () => { + process.env.PAPERCLIP_TOOL_ACTION_SIGNING_SECRET = "test-tool-action-signing-secret"; tempDb = await startEmbeddedPostgresTestDatabase("paperclip-tool-gateway-"); db = createDb(tempDb.connectionString); }, 20_000); @@ -173,6 +175,11 @@ describeEmbeddedPostgres("tool gateway acceptance", () => { afterAll(async () => { await tempDb?.cleanup(); + if (originalToolActionSigningSecret === undefined) { + delete process.env.PAPERCLIP_TOOL_ACTION_SIGNING_SECRET; + } else { + process.env.PAPERCLIP_TOOL_ACTION_SIGNING_SECRET = originalToolActionSigningSecret; + } }); it("hides and denies every external tool when an agent has no gateway profile", async () => {