Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(postgres-shared-types): create the vector extension in setup

garrytan8c52ccd23078
diff --git a/test/e2e/postgres-shared-types.test.ts b/test/e2e/postgres-shared-types.test.ts
index ba18d6619f..b78ec4b963 100644
--- a/test/e2e/postgres-shared-types.test.ts
+++ b/test/e2e/postgres-shared-types.test.ts
@@ -27,6 +27,8 @@ beforeAll(async () => {
if (!url) return;
assertSafeE2eDatabaseUrl(url);
admin = postgres(url, { max: 1, onnotice: () => {} });
+ // The pgvector case needs the extension; a fresh database (the stress gate makes one per iteration) has none yet.
+ await admin.unsafe('CREATE EXTENSION IF NOT EXISTS vector');
await admin.unsafe(`CREATE TABLE ${table} (c int)`);
await admin.unsafe(`INSERT INTO ${table} VALUES (1)`);
});