Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(control-api): isolate real postgres migration roles
Alfredo Lopez8d0d70dd0188
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 305db4444..d6708a2cb 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.460",+ "version": "0.1.461","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.460",+ "version": "0.1.461","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/image-policy": "file:../packages/image-policy",diff --git a/control-api/package.json b/control-api/package.jsonindex 5af12984c..0a440c422 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.460",+ "version": "0.1.461","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/db.realPostgresMigration.integration.test.ts b/control-api/test/db.realPostgresMigration.integration.test.tsindex 783c365c8..628966dea 100644--- a/control-api/test/db.realPostgresMigration.integration.test.ts+++ b/control-api/test/db.realPostgresMigration.integration.test.ts@@ -129,7 +129,10 @@ describeRealPostgres('control-api real Postgres migrations', () => {beforeAll(async () => {adminPool = new Pool({ connectionString: adminUrl })- await adminPool.query(`DROP ROLE IF EXISTS ${runtimeRoles.join(', ')}`)+ // Roles are cluster-global in PostgreSQL and may own objects in the+ // shared `profiles` database. Never drop them while preparing an+ // isolated migration database; initDb is idempotent and reconciles the+ // existing role attributes and grants in the database under test.await adminPool.query(`CREATE DATABASE ${quoteIdent(database)}`)dbPool = new Pool({ connectionString })})@@ -145,7 +148,6 @@ describeRealPostgres('control-api real Postgres migrations', () => {[database])await adminPool.query(`DROP DATABASE IF EXISTS ${quoteIdent(database)}`)- await adminPool.query(`DROP ROLE IF EXISTS ${runtimeRoles.join(', ')}`)await adminPool.end()}})