Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PayloadTestRequest command in DGGEN #31907

Merged
merged 18 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments
tennessee-google committed Feb 5, 2024
commit a2d9b97c9660c5812a5369f73d14c5f57d3cc9b1
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a
uint32_t features = 0;

#if CHIP_CONFIG_MAX_PATHS_PER_INVOKE > 1
features |= chip::to_underlying(Clusters::GeneralDiagnostics::Feature::kDataModelTest);
features |= to_underlying(Clusters::GeneralDiagnostics::Feature::kDataModelTest);
#endif // CHIP_CONFIG_MAX_PATHS_PER_INVOKE > 1

return aEncoder.Encode(features);
@@ -455,7 +455,7 @@ bool emberAfGeneralDiagnosticsClusterPayloadTestRequestCallback(CommandHandler *
// Max allowed is 2048.
if (commandData.count > 2048)
{
commandObj->AddStatus(commandPath, Status::InvalidCommand);
commandObj->AddStatus(commandPath, Status::ConstraintError);
return true;
}

4 changes: 2 additions & 2 deletions src/python_testing/TC_TestEventTrigger.py
Original file line number Diff line number Diff line change
@@ -146,8 +146,8 @@ async def test_multiple_command_request_feature_present_if_needed(self):
if has_data_model_test_feature:
# Test count too large (above max 2048)
with asserts.assert_raises_regex(InteractionModelError,
"InvalidCommand",
"PayloadTestRequest with request too large (> 2048) must return InvalidCommand"):
"ConstraintError",
"PayloadTestRequest with request too large (> 2048) must return ConstraintError"):
await dev_ctrl.SendCommand(
self.dut_node_id,
endpoint=0,