MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pauseMigrationForTest

Function pauseMigrationForTest

apps/local/src/db/v1-v2-migration.ts:1332–1341  ·  view source on GitHub ↗
(point: string)

Source from the content-addressed store, hash-verified

1330};
1331
1332const pauseMigrationForTest = async (point: string): Promise<void> => {
1333 if (process.env.NODE_ENV !== "test") return;
1334 if (process.env.EXECUTOR_V1_V2_MIGRATION_PAUSE_AT !== point) return;
1335 const marker = process.env.EXECUTOR_V1_V2_MIGRATION_PAUSE_FILE;
1336 if (!marker) return;
1337 fs.mkdirSync(dirname(marker), { recursive: true });
1338 fs.writeFileSync(marker, `${point}\n`, { mode: 0o600 });
1339 fsyncFileIfExists(marker);
1340 await new Promise<void>(() => {});
1341};
1342
1343const writeMigratedSecrets = async (input: {
1344 readonly fileValues: Record<string, string>;

Callers 3

insertPlanFunction · 0.85
completeJournaledFlipFunction · 0.85

Calls 1

fsyncFileIfExistsFunction · 0.85

Tested by

no test coverage detected