Skip to content

Add mock and integration tests for client RPCs#31

Open
Marenz wants to merge 2 commits intofrequenz-floss:v0.x.xfrom
Marenz:add/client-tests
Open

Add mock and integration tests for client RPCs#31
Marenz wants to merge 2 commits intofrequenz-floss:v0.x.xfrom
Marenz:add/client-tests

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Feb 19, 2026

Mock tests for all client methods: create, update, list, activate_market_locations, deactivate_market_locations, stream_samples, and upsert_samples. Verifies correct protobuf request construction and response parsing.

Integration tests require a running Market Metering service and are excluded from CI via the integration marker (uv run pytest -m integration).

Depends on #36.

@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) labels Feb 19, 2026
Add MarketLocationDetail, MarketLocationOperationResult, and
MarketLocationOperationErrorCode. Return MarketLocationDetail from
create/update RPCs. Support batch activate/deactivate with per-location
results. Add ingest_time to UpsertResult. Expose revision_strategy on
stream filter. Remove duplicate _datetime_to_timestamp helper.

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Mock tests cover all client methods: create, update, list,
activate_market_locations, deactivate_market_locations, stream_samples,
and upsert_samples.

Integration tests require a running service and are excluded from CI
via the 'integration' marker. Run with: uv run pytest -m integration

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation 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