Add roborock.testing — stateful device simulators for integration tes… #3108
ci.yml
on: push
Matrix: test
Lint Commit Messages
15s
lint
16s
Build Package
Test Semantic Release
0s
release
1m 32s
Annotations
1 error, 3 warnings, and 1 notice
|
Lint Commit Messages
You have commit messages with errors
⧗ input: Add roborock.testing — stateful device simulators for integration testing (#860)
* feat: add roborock.testing module for stateful integration testing
Introduces a new roborock.testing package that provides stateful firmware
simulators, fake transport channels, and cloud environment fakes. This
allows downstream consumers (like the Home Assistant integration) to write
high-fidelity integration tests using the real client library classes
instead of fragile top-level mocks.
New modules:
- channel.py: FakeChannel in-memory transport implementing Channel protocol
- simulator.py: RoborockDeviceSimulator base class
- v1_simulator.py: V1VacuumSimulator with stateful command handlers
- cloud.py: FakeRoborockCloud with HTTP endpoint mocking
Tests split by module:
- test_channel.py: FakeChannel subscribe/publish/notify
- test_cloud.py: Discovery, login errors, dynamic device addition
- test_v1_simulator.py: Trait refresh/reset, state transitions, push updates
* docs: add comment explaining dss field in v1_simulator
* feat: expose in_cleaning, in_returning, charge_status, and dss on V1VacuumSimulator
* feat: expose dock_type configuration in V1VacuumSimulator
* feat: honor publish_side_effect in simulator and raise NotImplementedError in base _handle_publish
* refactor: inherit FakeChannel from Channel Protocol
* refactor: type simulator consumables state using Consumable dataclass
* refactor: type simulator dnd, clean summary and record using real dataclasses
* refactor: type simulator status, network info and init status using real dataclasses
* refactor: expose raw status and app_init dataclasses on simulator for direct test manipulation
* refactor: export and define all simulator state default constants at package level
* refactor: update _handle_app_get_init_status to serialize self.app_init and dynamically resolve status_info fields from self.status
* test: add E2E test case for multiple simulators with independent network info overrides
* refactor: replace FakeUserState with library UserData dataclass on FakeRoborockCloud
* refactor: decouple default product id from device duid and share DEFAULT_PRODUCT_ID constant
* refactor: rename self.servers to self.simulated_devices and restore hardcoded qiCNieZa in mock_data
* refactor: delete redundant properties from V1VacuumSimulator and update trigger_push_update
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
|
|
lint
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
test (3.11)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
test (3.14)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
release
Generating and uploading digital attestations
|