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

Generate LockUserChange events when clearing a credential. #33797

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def _GetDarwinFrameworkToolUnsupportedTests() -> Set[str]:
"""Tests that fail in darwin-framework-tool for some reason"""
return {
"DL_LockUnlock", # darwin-framework-tool does not currently support reading or subscribing to Events
"DL_UsersAndCredentials", # darwin-framework-tool does not currently support reading or subscribing to Events
"Test_AddNewFabricFromExistingFabric", # darwin-framework-tool does not support the GetCommissionerRootCertificate command.
# The name of the arguments once converted differs for chip-tool and darwin-framework-tool (attribute-ids vs attribute-id. See #31934)
"TestAttributesById",
Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ void DoorLockServer::clearCredentialCommandHandler(
}

commandObj->AddStatus(commandPath,
clearCredential(commandPath.mEndpointId, modifier, sourceNodeId, credentialType, credentialIndex, false));
clearCredential(commandPath.mEndpointId, modifier, sourceNodeId, credentialType, credentialIndex, true));
woody-apple marked this conversation as resolved.
Show resolved Hide resolved
}

void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler * commandObj,
Expand Down
17 changes: 17 additions & 0 deletions src/app/tests/suites/DL_UsersAndCredentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,23 @@ tests:
- name: "NextUserIndex"
value: 2

- label: "Make sure a LockUserChange event was generated"
command: "readEvent"
event: "LockUserChange"
# I wish there were a way to not hardcode this 25, but it's experimentally
# determined: doing a read without an eventNumber filter here shows 24
# LockUserChange events before this removal.
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
eventNumber: 25
response:
value:
{
LockDataType: LockDataTypeEnum.PIN,
DataOperationType: DataOperationTypeEnum.Clear,
OperationSource: OperationSourceEnum.Remote,
UserIndex: 1,
DataIndex: 1,
}

- label: "Clear the second PIN credential"
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
Expand Down
Loading