From 8931d89c9a9785a5f0300df1e257988ad3a864ee Mon Sep 17 00:00:00 2001 From: Guido X Jansen Date: Mon, 9 Mar 2026 16:34:43 +0100 Subject: [PATCH] fix(tests): align tenant-isolation test with lexicon v0.3.0 schema (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pushSchema SQL and seed data were not updated in dcc9c76, causing CI to fail with "column site of relation topics does not exist". - Topics: remove content_format, add site, rename created_at → published_at - Replies: remove content_format - Seed data: createdAt → publishedAt for topic inserts --- tests/integration/tenant-isolation.test.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration/tenant-isolation.test.ts b/tests/integration/tenant-isolation.test.ts index 16cafb3..e8b8fdb 100644 --- a/tests/integration/tenant-isolation.test.ts +++ b/tests/integration/tenant-isolation.test.ts @@ -76,8 +76,8 @@ async function pushSchema(client: ReturnType): Promise { author_did TEXT NOT NULL, title TEXT NOT NULL, content TEXT NOT NULL, - content_format TEXT, category TEXT NOT NULL, + site TEXT, tags JSONB, community_did TEXT NOT NULL, cid TEXT NOT NULL, @@ -86,7 +86,7 @@ async function pushSchema(client: ReturnType): Promise { reaction_count INTEGER NOT NULL DEFAULT 0, vote_count INTEGER NOT NULL DEFAULT 0, last_activity_at TIMESTAMPTZ NOT NULL DEFAULT now(), - created_at TIMESTAMPTZ NOT NULL, + published_at TIMESTAMPTZ NOT NULL, indexed_at TIMESTAMPTZ NOT NULL DEFAULT now(), is_locked BOOLEAN NOT NULL DEFAULT false, is_pinned BOOLEAN NOT NULL DEFAULT false, @@ -106,7 +106,6 @@ async function pushSchema(client: ReturnType): Promise { rkey TEXT NOT NULL, author_did TEXT NOT NULL, content TEXT NOT NULL, - content_format TEXT, root_uri TEXT NOT NULL, root_cid TEXT NOT NULL, parent_uri TEXT NOT NULL, @@ -206,7 +205,7 @@ describe('tenant isolation (RLS)', () => { category: 'general', communityDid: COMMUNITY_A, cid: 'cid-aaa', - createdAt: now, + publishedAt: now, }, { uri: 'at://did:plc:user2/forum.barazo.topic/bbb', @@ -217,7 +216,7 @@ describe('tenant isolation (RLS)', () => { category: 'general', communityDid: COMMUNITY_B, cid: 'cid-bbb', - createdAt: now, + publishedAt: now, }, ]) @@ -402,7 +401,7 @@ describe('tenant isolation (RLS)', () => { category: 'general', communityDid: COMMUNITY_A, // Mismatch! cid: 'cid-evil', - createdAt: new Date(), + publishedAt: new Date(), }) ) expect.unreachable('INSERT should have been blocked by RLS') -- 2.51.2