test: add gRPC smoketest for CalibrationFeature's read commands - #8
Open
markzporter wants to merge 1 commit into
Open
test: add gRPC smoketest for CalibrationFeature's read commands#8markzporter wants to merge 1 commit into
markzporter wants to merge 1 commit into
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
GetDeckCalibration/GetPipetteOffset(#6) raiseCalibrationUnavailableErrorunless the connector runswith_robot_server=True-- but nothing tested that happy path over the real wire.test_calibration_reads.pyinjects_hw_apidirectly 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
hardware_sila_channelfixture: boots the connector withwith_robot_server=True, using--robot's live address when given (production connectors already run this way), otherwise a localwith_robot_server=Truesimulator gated on--with-http-server.tests/integration/test_grpc_calibration_reads.py:GetDeckCalibrationreturns live identity-attitude data over gRPC;GetPipetteOffseton an unattached mount surfacesNoPipetteOnMountErrorover the wire as a defined SiLA error.Confirmed the response is keyed
"response_0"-- this connector's established convention for every command (documented inot2-sila-client'ssila_transport.py) -- not a defect in #6.Verified
Installed
robot_server/server_utilsper this repo's owntest.ymlrecipe and ran locally: full integration suite40 passed(was 38), no regressions. New tests skip cleanly without--with-http-server.ruff check/ruff format --checkclean.This runs automatically in CI:
test.ymlalready invokespytest tests/integration/ --with-http-serverwithrobot_serverinstalled.🤖 Generated with Claude Code