From 16848ca25f1e1380cd6339f81925638c92b712dd Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Tue, 19 Oct 2021 12:09:55 -0700 Subject: [PATCH] Bug-fix to Controller Commands Test 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. --- src/controller/tests/data_model/TestCommands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 5526d0b787eedc..d2dea50677953d 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -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) {