Skip to content

Commit 48b6f45

Browse files
committedApr 29, 2024
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 040e5bf commit 48b6f45

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
@@ -2251,7 +2251,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons
22512251

22522252
if (rateX == 0 && rateY == 0)
22532253
{
2254-
commandObj->AddStatus(commandPath, Status::Success);
2254+
commandObj->AddStatus(commandPath, Status::InvalidCommand);
22552255
return true;
22562256
}
22572257

‎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)