Skip to content

test: add gRPC smoketest for CalibrationFeature's read commands - #8

Open
markzporter wants to merge 1 commit into
mainfrom
feat/calibration-grpc-smoketest
Open

test: add gRPC smoketest for CalibrationFeature's read commands#8
markzporter wants to merge 1 commit into
mainfrom
feat/calibration-grpc-smoketest

Conversation

@markzporter

Copy link
Copy Markdown
Collaborator

What

GetDeckCalibration/GetPipetteOffset (#6) raise CalibrationUnavailableError unless the connector runs with_robot_server=True -- but nothing tested that happy path over the real wire. test_calibration_reads.py injects _hw_api directly into the controller, which covers the feature logic but bypasses app startup and the SiLA transport entirely, so it can't catch a startup-wiring regression (e.g. the hardware never getting attached the way the running app actually does it).

How

  • Add a hardware_sila_channel fixture: boots the connector with with_robot_server=True, using --robot's live address when given (production connectors already run this way), otherwise a local with_robot_server=True simulator gated on --with-http-server.
  • Add tests/integration/test_grpc_calibration_reads.py: GetDeckCalibration returns live identity-attitude data over gRPC; GetPipetteOffset on an unattached mount surfaces NoPipetteOnMountError over the wire as a defined SiLA error.

Confirmed the response is keyed "response_0" -- this connector's established convention for every command (documented in ot2-sila-client's sila_transport.py) -- not a defect in #6.

Verified

Installed robot_server/server_utils per this repo's own test.yml recipe and ran locally: full integration suite 40 passed (was 38), no regressions. New tests skip cleanly without --with-http-server. ruff check/ruff format --check clean.

This runs automatically in CI: test.yml already invokes pytest tests/integration/ --with-http-server with robot_server installed.

🤖 Generated with Claude Code

GetDeckCalibration/GetPipetteOffset (PR #6) raise CalibrationUnavailableError
unless the connector runs with_robot_server=True -- but nothing tested that
happy path over the real wire. test_calibration_reads.py injects _hw_api
directly into the controller, which covers the feature logic but bypasses
app startup and the SiLA transport entirely, so it can't catch a startup-
wiring regression.

Add a hardware_sila_channel fixture (boots the connector with_robot_server=True,
using --robot's live address when given, otherwise a local with_robot_server=True
simulator gated on --with-http-server) and a real gRPC test against it:
GetDeckCalibration returns live identity-attitude data, GetPipetteOffset on an
unattached mount surfaces NoPipetteOnMountError over the wire as a defined
SiLA error.

Confirmed the response is keyed "response_0" (this connector's established
convention for every command -- see sila_transport.py in ot2-sila-client),
not a bug in PR #6.

Verified locally with robot_server/server_utils installed per this repo's own
test.yml recipe: full integration suite 40 passed (was 38), no regressions;
new tests skip cleanly without --with-http-server.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant