mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 16:11:14 +00:00
546ddb3e6c
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>
34 lines
786 B
YAML
34 lines
786 B
YAML
services:
|
|
postgres:
|
|
extends:
|
|
file: docker-compose.yml
|
|
service: postgres
|
|
|
|
api:
|
|
extends:
|
|
file: docker-compose.yml
|
|
service: api
|
|
|
|
integration-tests:
|
|
build:
|
|
context: .
|
|
dockerfile: SatelliteProvider.IntegrationTests/Dockerfile
|
|
container_name: satellite-provider-integration-tests
|
|
environment:
|
|
- API_URL=http://api:8080
|
|
- INTEGRATION_TESTS_MODE=${INTEGRATION_TESTS_MODE:-full}
|
|
- DB_CONNECTION_STRING=Host=postgres;Port=5432;Database=satelliteprovider;Username=postgres;Password=postgres
|
|
volumes:
|
|
- ./ready:/app/ready
|
|
- ./tiles:/app/tiles
|
|
depends_on:
|
|
api:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|