Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[TC-FAN] Update REPL tests to expect CONSTRAINT_ERROR for unsupported FanMode

Aperta
#780 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@FrancoLionti ci sta già lavorando.

Dal 4/5/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Summary Title:

[TC-FAN] Update REPL tests to expect CONSTRAINT_ERROR for unsupported FanMode

Description:

A recent spec-compliance fix in the FanControl server cluster (src/app/clusters/fan-control-server/FanControlCluster.cpp) updated the error returned when setting the FanMode attribute to an unsupported value.

Previously, attempting to set FanMode to kLow when the FanModeSequence was kOffHighAuto or kOffHigh returned Status::InvalidInState. Based on review feedback from @shubhamdp, this was pointed out to return CONSTRAINT_ERROR to align with the specification.
[TC-FAN] Update REPL tests to expect CONSTRAINT_ERROR for unsupported FanMode

However, this change caused existing FanControl REPL tests to fail because they are still hardcoded to expect the old error type (InvalidInState) instead of the newly implemented CONSTRAINT_ERROR. This issue tracks the work to update the REPL test assertions so they pass against the corrected server behavior.

Steps to reproduce:

  1. Run the FanControl REPL tests that validate writing to the FanMode attribute.
  2. Trigger the specific test case that attempts to write FanModeEnum::kLow while the FanModeSequence is set to kOffHighAuto or kOffHigh.
  3. Observe the test failure (the test expects the outdated status code, while the server correctly returns CONSTRAINT_ERROR).
  4. Update the REPL test assertions to expect CONSTRAINT_ERROR (or its equivalent status enum in the test framework) to resolve the failure.

Logs:

N/A - Test failure occurs during REPL test execution due to a known assertion mismatch.

Additional Info:

  • Target File: src/app/clusters/fan-control-server/FanControlCluster.cpp and associated REPL test scripts.
  • Reviewer Context: shubhamdp noted: "This should be CONSTRAINT_ERROR. If an attempt is made to set this attribute to a value not supported by the server as indicated in the FanModeSequence attribute, the server SHALL respond with CONSTRAINT_ERROR."
Lingua principale
Python
Stelle
20
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di project-chip/matter-test-scripts

Tutte le issue di project-chip/matter-test-scripts

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.