-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
Description
Summary
The Thermostat Server cluster (src/app/clusters/thermostat-server/) currently has no dedicated unit tests. This gap was surfaced by a Codecov patch coverage report on PR #43583 which added a call to MatterReportingAttributeChangeCallback inside SetActivePreset.
Coverage was 0% for that path because no test exercises it.
Affected files
src/app/clusters/thermostat-server/thermostat-server.cppsrc/app/clusters/thermostat-server/thermostat-server-presets.cppsrc/app/clusters/thermostat-server/thermostat-server-atomic.cppsrc/app/clusters/thermostat-server/thermostat-server-suggestions.cpp
What is missing
| Area | Examples of untested paths |
|---|---|
SetActivePreset |
success path, invalid handle, no delegate |
CommitPendingPresets |
success, delegate error |
| Atomic write | begin / commit / rollback |
| Suggestions | append, remove, re-evaluate |
Read / Write attribute access |
preset-related attributes |
Suggested fix
A first test file was introduced in PR #43585 to cover the SetActivePreset success path. It can serve as a starting point for broader coverage.
The test infrastructure (delegate mock, stubs for ZAP-generated accessors) needed to compile thermostat server sources in the app test suite is also already set up by that PR.
References
- PR adding first test: [Tests] Add unit tests for Thermostat Server Presets functionality #43585
Reproduction steps
Tests missing
Bug prevalence
always
GitHub hash of the SDK that was being used
N/A
Platform
linux
Platform Version(s)
No response
Anything else?
No response
Reactions are currently unavailable