Skip to content

Commit

Permalink
Bug-fix to Controller Commands Test (#10663)
Browse files Browse the repository at this point in the history
In TestCommands.cpp, the logic in DispatchSingleClusterCommand was
expecting and decoding the wrong kind of command. This was oddly not
triggering a failure before, but it is now asserting (as it should).

Tests: Ensured TestCommands runs successfully.
  • Loading branch information
mrjerryjohns authored and pull[bot] committed Nov 15, 2021
1 parent 132856d commit 2548322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/tests/data_model/TestCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip
aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId));

if (aCommandPath.mClusterId == TestCluster::Id &&
aCommandPath.mCommandId == TestCluster::Commands::TestStructArrayArgumentRequest::Type::GetCommandId())
aCommandPath.mCommandId == TestCluster::Commands::TestSimpleArgumentRequest::Type::GetCommandId())
{
TestCluster::Commands::TestStructArrayArgumentRequest::DecodableType dataRequest;
TestCluster::Commands::TestSimpleArgumentRequest::DecodableType dataRequest;

if (DataModel::Decode(aReader, dataRequest) != CHIP_NO_ERROR)
{
Expand Down

0 comments on commit 2548322

Please sign in to comment.