test: route codex refresh env setup · openclaw/openclaw@459ba6e
shakkernerd
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ import path from "node:path";
|
9 | 9 | import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; |
10 | 10 | import { resetFileLockStateForTest } from "../../infra/file-lock.js"; |
11 | 11 | import { closeOpenClawAgentDatabasesForTest } from "../../state/openclaw-agent-db.js"; |
12 | | -import { captureEnv } from "../../test-utils/env.js"; |
| 12 | +import { captureEnv, setTestEnvValue } from "../../test-utils/env.js"; |
13 | 13 | import { |
14 | 14 | OAUTH_AGENT_ENV_KEYS, |
15 | 15 | createExpiredOauthStore, |
@@ -169,8 +169,8 @@ describe("resolveApiKeyForProfile openai refresh fallback", () => {
|
169 | 169 | const caseRoot = path.join(tempRoot, `case-${++caseIndex}`); |
170 | 170 | agentDir = path.join(caseRoot, "agents", "main", "agent"); |
171 | 171 | await fs.mkdir(agentDir, { recursive: true }); |
172 | | -process.env.OPENCLAW_STATE_DIR = caseRoot; |
173 | | -process.env.OPENCLAW_AGENT_DIR = agentDir; |
| 172 | +setTestEnvValue("OPENCLAW_STATE_DIR", caseRoot); |
| 173 | +setTestEnvValue("OPENCLAW_AGENT_DIR", agentDir); |
174 | 174 | }); |
175 | 175 | |
176 | 176 | afterEach(async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。