Skip to content

DB: seed/fixtures for local dev and integration tests (deterministic data) #254

Description

@Depo-dev

Summary

Provide a rich, deterministic seed dataset for local dev and integration tests.

Background & current behaviour

docker/ci-seed.sql seeds only a CI API key. There is no representative dataset (contracts, events across ledgers, keys/tiers), so locally the endpoints return empty results and integration tests must build their own fixtures.

Why this matters for MVP

A realistic seed makes local development and demos meaningful and gives integration tests stable, shared fixtures.

Proposed implementation

  1. Author a deterministic seed producing: several contracts in indexed_contracts, a spread of soroban_events across ledgers/contracts (including token events), ledger_metadata, and API keys across tiers.
  2. Keep it idempotent and fast; parameterise volume.
  3. Wire it into docker-compose.dev.yml and the integration test setup.
  4. Document how to load/reset it.

Acceptance criteria

  • Deterministic seed with contracts, events, ledger metadata, keys/tiers.
  • Idempotent + parameterised volume.
  • Wired into dev compose + integration tests.
  • Documented in README.

Affected files / components

  • docker/ (seed script + compose wiring)
  • database/

Testing & verification

Load the seed and hit /v1/events, /v1/stats/contracts asserting non-empty, expected data.

Related / dependencies

Feeds E2E/contract tests and local demos.

Out of scope

Production data generation.


Target branch

All work for this issue MUST target the dev branch. Cut your feature branch from dev and open the pull request against dev, never against main. Any PR opened against main for this issue will be closed and asked to re-target dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    databasePostgres schema, migrations, queriesenhancementImprovement to existing behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions