mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:41:24 +00:00
fix(ci): stabilize state-dir dependent tests
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { ButtonInteraction, ComponentData } from "@buape/carbon";
|
||||
import { Routes } from "discord-api-types/v10";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { DiscordExecApprovalConfig } from "../../config/types.discord.js";
|
||||
import {
|
||||
@@ -13,7 +15,7 @@ import {
|
||||
type ExecApprovalButtonContext,
|
||||
} from "./exec-approvals.js";
|
||||
|
||||
const STORE_PATH = "/tmp/openclaw-exec-approvals-test.json";
|
||||
const STORE_PATH = path.join(os.tmpdir(), "openclaw-exec-approvals-test.json");
|
||||
|
||||
const writeStore = (store: Record<string, unknown>) => {
|
||||
fs.writeFileSync(STORE_PATH, `${JSON.stringify(store, null, 2)}\n`, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user