From 66e7c9fca44fd75ad9e1689e5f57377b30757eed Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov <7889985+andreybavt@users.noreply.github.com> Date: Thu, 14 May 2026 17:59:21 +0200 Subject: [PATCH] test(context): update SQL analysis port fixtures --- .../historic-sql/historic-sql.adapter.test.ts | 6 ++++++ .../historic-sql/local-ingest-acceptance.test.ts | 1 + .../adapters/historic-sql/stage-unified.test.ts | 4 ++++ packages/context/src/ingest/local-adapters.test.ts | 12 ++++++++++++ 4 files changed, 23 insertions(+) diff --git a/packages/context/src/ingest/adapters/historic-sql/historic-sql.adapter.test.ts b/packages/context/src/ingest/adapters/historic-sql/historic-sql.adapter.test.ts index 36461bb2..3b5697d0 100644 --- a/packages/context/src/ingest/adapters/historic-sql/historic-sql.adapter.test.ts +++ b/packages/context/src/ingest/adapters/historic-sql/historic-sql.adapter.test.ts @@ -18,6 +18,9 @@ const sqlAnalysis: SqlAnalysisPort = { async analyzeBatch() { return new Map(); }, + async validateReadOnly() { + return { ok: true }; + }, }; const reader: HistoricSqlReader = { @@ -79,6 +82,9 @@ describe('HistoricSqlSourceAdapter', () => { ], ]); }, + async validateReadOnly() { + return { ok: true }; + }, }; const adapter = new HistoricSqlSourceAdapter({ sqlAnalysis: batchSqlAnalysis, diff --git a/packages/context/src/ingest/adapters/historic-sql/local-ingest-acceptance.test.ts b/packages/context/src/ingest/adapters/historic-sql/local-ingest-acceptance.test.ts index 8f583d9c..ae22730d 100644 --- a/packages/context/src/ingest/adapters/historic-sql/local-ingest-acceptance.test.ts +++ b/packages/context/src/ingest/adapters/historic-sql/local-ingest-acceptance.test.ts @@ -159,6 +159,7 @@ function acceptanceSqlAnalysis(): SqlAnalysisPort { ); }, ), + validateReadOnly: vi.fn(async () => ({ ok: true })), }; } diff --git a/packages/context/src/ingest/adapters/historic-sql/stage-unified.test.ts b/packages/context/src/ingest/adapters/historic-sql/stage-unified.test.ts index b2af032f..d09a4d40 100644 --- a/packages/context/src/ingest/adapters/historic-sql/stage-unified.test.ts +++ b/packages/context/src/ingest/adapters/historic-sql/stage-unified.test.ts @@ -83,6 +83,7 @@ describe('stageHistoricSqlAggregatedSnapshot', () => { ], ['bad-parse', { tablesTouched: [], columnsByClause: {}, error: 'parse failed' }], ])), + validateReadOnly: vi.fn(async () => ({ ok: true })), }; await stageHistoricSqlAggregatedSnapshot({ @@ -207,6 +208,7 @@ describe('stageHistoricSqlAggregatedSnapshot', () => { }, ], ])), + validateReadOnly: vi.fn(async () => ({ ok: true })), }; await stageHistoricSqlAggregatedSnapshot({ @@ -283,6 +285,7 @@ describe('stageHistoricSqlAggregatedSnapshot', () => { }, ], ])), + validateReadOnly: vi.fn(async () => ({ ok: true })), }; await stageHistoricSqlAggregatedSnapshot({ @@ -403,6 +406,7 @@ describe('stageHistoricSqlAggregatedSnapshot', () => { }, ], ])), + validateReadOnly: vi.fn(async () => ({ ok: true })), }; await stageHistoricSqlAggregatedSnapshot({ diff --git a/packages/context/src/ingest/local-adapters.test.ts b/packages/context/src/ingest/local-adapters.test.ts index e8cbf5a5..30bd106d 100644 --- a/packages/context/src/ingest/local-adapters.test.ts +++ b/packages/context/src/ingest/local-adapters.test.ts @@ -97,6 +97,9 @@ describe('local ingest adapters', () => { async analyzeBatch() { return new Map(); }, + async validateReadOnly() { + return { ok: true }; + }, }; const adapters = createDefaultLocalIngestAdapters(project, { historicSql: { @@ -140,6 +143,9 @@ describe('local ingest adapters', () => { async analyzeBatch() { return new Map(); }, + async validateReadOnly() { + return { ok: true }; + }, }, reader, queryClient, @@ -166,6 +172,9 @@ describe('local ingest adapters', () => { async analyzeBatch() { return new Map(); }, + async validateReadOnly() { + return { ok: true }; + }, }, postgresQueryClient: { async executeQuery() { @@ -258,6 +267,9 @@ describe('local ingest adapters', () => { async analyzeBatch() { return new Map(); }, + async validateReadOnly() { + return { ok: true }; + }, }, postgresQueryClient: { async executeQuery() {