Skip to content

Commit 722f727

Browse files
Return invalid comamnd on MoveColor command with RateX and RateY both at 0. Add a test step to TC_CC_5.2 to validate the expected failure
1 parent 2fddae4 commit 722f727

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/app/clusters/color-control-server/color-control-server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
22772277

22782278
if (rateX == 0 && rateY == 0)
22792279
{
2280-
commandObj->AddStatus(commandPath, Status::Success);
2280+
commandObj->AddStatus(commandPath, Status::InvalidCommand);
22812281
return true;
22822282
}
22832283

src/app/tests/suites/certification/Test_TC_CC_5_2.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,22 @@ tests:
217217
minValue: 0
218218
maxValue: 3
219219

220+
- label: "Step 5a: TH sends MoveColor command to DUT with invalid parameters RateX=0 and RateY=0"
221+
command: "MoveColor"
222+
PICS: CC.S.F03 && CC.S.C08.Rsp
223+
arguments:
224+
values:
225+
- name: "RateX"
226+
value: 0
227+
- name: "RateY"
228+
value: 0
229+
- name: "OptionsMask"
230+
value: 0
231+
- name: "OptionsOverride"
232+
value: 0
233+
response:
234+
error: INVALID_COMMAND
235+
220236
- label: "Turn off light that we turned on"
221237
PICS: OO.S.C00.Rsp
222238
cluster: "On/Off"

0 commit comments

Comments
 (0)