mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-22 21:31:17 +00:00
fix(testing): preserve changed-gate diagnostics
This commit is contained in:
@@ -3117,7 +3117,7 @@ function prepareFullCheckoutForSync(options = {}) {
|
||||
cleanupFullCheckout(dir, active);
|
||||
active = false;
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
throw new Error(`git bundle for changed-gate sync failed: ${message}`);
|
||||
throw new Error(`git bundle for changed-gate sync failed: ${message}`, { cause: error });
|
||||
} finally {
|
||||
if (bundleTempDir) {
|
||||
rmSync(bundleTempDir, { recursive: true, force: true });
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
isProviderAdvertised,
|
||||
parseProvidersFromHelp,
|
||||
} from "../../scripts/crabbox-wrapper-providers.mjs";
|
||||
import { makeTempDir } from "../helpers/temp-dir.js";
|
||||
|
||||
const tempDirs: string[] = [];
|
||||
const repoRoot = process.cwd();
|
||||
@@ -3454,8 +3455,7 @@ describe("scripts/crabbox-wrapper", () => {
|
||||
|
||||
it("materializes the changed-gate bundle in the temporary sync checkout", () => {
|
||||
const bundle = "synthetic-bundle";
|
||||
const markerDir = mkdtempSync(path.join(tmpdir(), "openclaw-changed-gate-force-add-"));
|
||||
tempDirs.push(markerDir);
|
||||
const markerDir = makeTempDir(tempDirs, "openclaw-changed-gate-force-add-");
|
||||
const forceAddMarker = path.join(markerDir, "force-added");
|
||||
const result = runWrapper(
|
||||
"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
|
||||
@@ -3505,8 +3505,7 @@ describe("scripts/crabbox-wrapper", () => {
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"does not follow a checkout-controlled changed-gate bundle symlink",
|
||||
() => {
|
||||
const fixtureDir = mkdtempSync(path.join(tmpdir(), "openclaw-changed-gate-symlink-"));
|
||||
tempDirs.push(fixtureDir);
|
||||
const fixtureDir = makeTempDir(tempDirs, "openclaw-changed-gate-symlink-");
|
||||
const victimPath = path.join(fixtureDir, "victim");
|
||||
const victimContents = "preserve-me\n";
|
||||
const bundle = "synthetic-bundle";
|
||||
|
||||
Reference in New Issue
Block a user