import fs from "node:fs/promises"; import path from "node:path"; import { describe, expect, it } from "vitest"; import {
buildCiSafeCodexConfig,
writeCiSafeCodexConfig,
} from "../../scripts/prepare-codex-ci-config.ts"; import { withTempDir } from "../test-utils/temp-dir.js";
describe("prepare-codex-ci-config", () => {
it("renders a minimal trusted non-interactive Codex config for the target repo", () => {
expect(
buildCiSafeCodexConfig({
projectPath: "/tmp/openclaw-pr-sync.xph5uu",
}),
).toBe(
[ "# Generated for Codex CI runs.", "# Keep the checked-out repo trusted while avoiding maintainer-local", "# provider/profile overrides that do not exist on CI runners.", 'approval_policy = "never"', 'sandbox_mode = "workspace-write"', "", '[projects."/tmp/openclaw-pr-sync.xph5uu"]', 'trust_level = "trusted"', "",
].join("\n"),
);
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.