fix: route oauth lock env setup · openclaw/openclaw@a8ca961
shakkernerd
·
2026-06-15
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import fs from "node:fs/promises";
|
7 | 7 | import os from "node:os"; |
8 | 8 | import path from "node:path"; |
9 | 9 | import { afterEach, beforeEach, describe, expect, it } from "vitest"; |
10 | | -import { captureEnv } from "../../test-utils/env.js"; |
| 10 | +import { captureEnv, setTestEnvValue } from "../../test-utils/env.js"; |
11 | 11 | import { resolveOAuthRefreshLockPath } from "./paths.js"; |
12 | 12 | |
13 | 13 | const lockBasenamePattern = /^lock-[0-9a-f]{32}$/; |
@@ -28,7 +28,7 @@ describe("resolveOAuthRefreshLockPath", () => {
|
28 | 28 | |
29 | 29 | beforeEach(async () => { |
30 | 30 | stateDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-auth-lock-path-")); |
31 | | -process.env.OPENCLAW_STATE_DIR = stateDir; |
| 31 | +setTestEnvValue("OPENCLAW_STATE_DIR", stateDir); |
32 | 32 | }); |
33 | 33 | |
34 | 34 | afterEach(async () => { |
@@ -138,7 +138,7 @@ describe("resolveOAuthRefreshLockPath fuzz", () => {
|
138 | 138 | |
139 | 139 | beforeEach(async () => { |
140 | 140 | stateDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-auth-lock-path-fuzz-")); |
141 | | -process.env.OPENCLAW_STATE_DIR = stateDir; |
| 141 | +setTestEnvValue("OPENCLAW_STATE_DIR", stateDir); |
142 | 142 | }); |
143 | 143 | |
144 | 144 | afterEach(async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。