Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: keep catalog restart probes on the configured test database

[._.]/ Adam Eivya9a89d25d3bd
diff --git a/server/routes/catalog.test.js b/server/routes/catalog.test.js
index 1ae3aa2977..6a341a9645 100644
--- a/server/routes/catalog.test.js
+++ b/server/routes/catalog.test.js
@@ -23,7 +23,7 @@ import { execFile } from 'node:child_process';
import { promisify } from 'node:util';
import { request } from '../lib/testHelper.js';
import { errorMiddleware } from '../lib/errorHandler.js';
-import { checkHealth, ensureSchema, close, query, withTransaction } from '../lib/db.js';
+import { checkHealth, ensureSchema, close, query, withTransaction, POOL_CONFIG } from '../lib/db.js';
import { requireDbOrSkip } from '../lib/dbTestGate.js';
// Mock embeddings — the bulk-import + restore routes call these; we don't want a
@@ -501,7 +501,7 @@ describe.skipIf(!runDb)('POST /api/catalog/scraps/:id/commit — universe bindin
console.log('RECEIPT:' + JSON.stringify(result));
`, JSON.stringify({ scrapId: scrap.id, body })], {
cwd: new URL('../', import.meta.url),
- env: { ...process.env, NODE_ENV: 'test', PGDATABASE: 'portos_test' },
+ env: { ...process.env, NODE_ENV: 'test', PGDATABASE: POOL_CONFIG.database },
});
const restartedResult = JSON.parse(stdout.split('\n').find(line => line.startsWith('RECEIPT:')).slice(8));
expect(restartedResult).toEqual(first.body.ingredients);