Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: the sync-pass memory smoke test guards its database URL before dropping its clone databases
garrytand5a3088490d7
diff --git a/test/e2e/bench-sync-pass-memory.test.ts b/test/e2e/bench-sync-pass-memory.test.tsindex bb6e84b24a..ad4a8965e9 100644--- a/test/e2e/bench-sync-pass-memory.test.ts+++ b/test/e2e/bench-sync-pass-memory.test.ts@@ -10,12 +10,14 @@ import { mkdtempSync, readFileSync, rmSync } from 'node:fs';import { tmpdir } from 'node:os';import { join, resolve } from 'node:path';import postgres from '#postgres';+import { assertSafeE2eDatabaseUrl } from '../helpers/db-guard.ts';const url = process.env.DATABASE_URL;const BENCH = join(resolve(import.meta.dir, '../..'), 'scripts/bench/sync-pass-memory.ts');describe.skipIf(!url)('sync-pass memory probe', () => {test('seeds a template brain and its conversion apply adopts every database-ahead page while sampling memory', async () => {+ assertSafeE2eDatabaseUrl(url!);const work = mkdtempSync(join(tmpdir(), 'sync-pass-memory-smoke-'));const tag = `smoke_${process.pid}`;const probe = (...argv: string[]) => spawnSync(process.execPath, [BENCH, ...argv, '--url', url!, '--dir', work, '--tag', tag],