Skip to content

WIP: Add testcontainers for integration tests#49

Draft
Marenz wants to merge 1 commit intofrequenz-floss:v0.x.xfrom
Marenz:feat/testcontainers-integration
Draft

WIP: Add testcontainers for integration tests#49
Marenz wants to merge 1 commit intofrequenz-floss:v0.x.xfrom
Marenz:feat/testcontainers-integration

Conversation

@Marenz
Copy link
Copy Markdown
Contributor

@Marenz Marenz commented Apr 7, 2026

Work in Progress

This PR adds testcontainers support for integration tests.

What's included

Integration tests now use testcontainers to spin up GreptimeDB and the marketmeteringd service binary automatically.

  • Added testcontainers and requests dependencies to dev-pytest
  • Created conftest.py with fixtures for:
    • GreptimeDB container
    • marketmeteringd service process
    • Database schema initialization
  • Updated test_integration.py to use new fixtures
  • Tests skip automatically when Docker is unavailable

Requirements for integration tests:

  • Docker running
  • Service binary at ../frequenz-service-marketmetering/target/release/marketmeteringd

Integration tests now use testcontainers to spin up GreptimeDB and
the marketmeteringd service binary automatically.

- Added testcontainers and requests dependencies to dev-pytest
- Created conftest.py with fixtures for:
  - GreptimeDB container
  - marketmeteringd service process
  - Database schema initialization
- Updated test_integration.py to use new fixtures
- Tests skip automatically when Docker is unavailable

Requires:
- Docker running
- Service binary at ../frequenz-service-marketmetering/target/release/marketmeteringd

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
@github-actions github-actions bot added part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) labels Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant