From 465544792c8ae28f418802eec1db1becaf0754ff Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 5 Aug 2026 20:22:26 -0700 Subject: [PATCH] test(agents): use canonical auth session fixtures (#119821) --- ...un-embedded-agent.auth-profile-rotation.e2e.test.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/agents/embedded-agent-runner.run-embedded-agent.auth-profile-rotation.e2e.test.ts b/src/agents/embedded-agent-runner.run-embedded-agent.auth-profile-rotation.e2e.test.ts index 47117da9f6d7..45e68cafcb18 100644 --- a/src/agents/embedded-agent-runner.run-embedded-agent.auth-profile-rotation.e2e.test.ts +++ b/src/agents/embedded-agent-runner.run-embedded-agent.auth-profile-rotation.e2e.test.ts @@ -939,14 +939,7 @@ describe("runEmbeddedAgent auth profile rotation", () => { it("marks inline provider api key billing prompt failures without an auth profile", async () => { await withAgentWorkspace(async ({ agentDir, workspaceDir }) => { - await fs.writeFile( - path.join(agentDir, "auth-profiles.json"), - JSON.stringify({ version: 1, profiles: {} }), - ); - await fs.writeFile( - path.join(agentDir, "auth-state.json"), - JSON.stringify({ version: 1, usageStats: {} }), - ); + saveAuthProfileStore({ version: 1, profiles: {}, usageStats: {} }, agentDir); runEmbeddedAttemptMock.mockResolvedValueOnce( makeAttempt({ terminal: { kind: "failed", source: "prompt", error: new Error("insufficient credits") }, @@ -957,7 +950,6 @@ describe("runEmbeddedAgent auth profile rotation", () => { runEmbeddedAgentInline({ sessionId: "session:test", sessionKey: "agent:test:inline-api-key-prompt-billing", - sessionFile: path.join(workspaceDir, "session.jsonl"), workspaceDir, agentDir, config: makeConfig(),