mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 20:21:20 +00:00
[AZ-357] AC-2 follow-up: populated-duplicates migration test
Closes the partial-coverage gap from batch 10. Adds two integration tests in MigrationTests.cs: - DedupeSqlCollapsesDuplicatesByLatestUpdatedAt_AZ357_AC2: seeds a session-scoped temp table with intentional 4-column duplicates (varying updated_at and id), runs the exact dedupe SQL from migration 012, asserts only the expected rows survive (newest updated_at wins; ties broken by largest id). - NewUniqueConstraintExistsOnFourColumns_AZ357_AC2: queries pg_indexes against the live DB to assert idx_tiles_unique_location is a unique 4-column btree and excludes the version column. Also wires Npgsql 9.0.2 into the integration-tests project, exposes DB_CONNECTION_STRING + postgres healthcheck dependency to the test container in docker-compose.tests.yml, and registers the new tests in both smoke and full suites. Implementation note: first attempt used CREATE TEMP TABLE ON COMMIT DROP, which dropped the table immediately because each Npgsql command runs in its own implicit transaction. Removed ON COMMIT DROP — session-scoped temps are dropped on connection close, which is what we want. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,4 +7,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Npgsql" Version="9.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user