Skip to content

Integration test for cmd/ingestion full-import pipeline #64

@koinsaari

Description

@koinsaari

Goal

End-to-end integration test for cmd/ingestion full-import against a real Postgres/PostGIS container. The walking skeleton (#57) has no test coverage of the wired pipeline today.

Tracking under #10.

Scope

  • Build-tag integration, consistent with other integration tests in this repo (per CLAUDE.md).
  • Use testcontainers-go for Postgres/PostGIS, consistent with internal/testhelpers/.
  • Use a tiny fixture .osm.pbf (a handful of nodes, mix of POIs and non-POIs) checked into the repo under testdata/.
  • Run the full pipeline (osm.StreamNodesEvaluateTransformNodeUpsertBatch).
  • Assert:
    • Only nodes matching osm.Evaluate land in places.
    • Place.Geometry, Tags, Rank are populated correctly for a known fixture node.
    • Re-running full-import on the same fixture is a no-op on row count (idempotency via (osm_id, osm_type) conflict key).

Out of scope

  • diff-sync testing (covered in its own issue).
  • Performance / load testing.

Acceptance

  • New file under cmd/ingestion/ (e.g. full_import_integration_test.go) with the integration build tag.
  • go test -tags integration ./cmd/ingestion/... passes locally and in CI.
  • Fixture .osm.pbf is small (< 50 KB) and version-controlled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions