-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Enhance Lockout Functionality: Add Test for AccessFailedAsync Incrementing Count #60350
base: main
Are you sure you want to change the base?
Conversation
Thanks for your PR, @shethaadit. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Identity/Extensions.Core/src/UserManager.cs:1833
- Add a test to cover the scenario where Options.Lockout.DefaultLockoutTimeSpan is TimeSpan.MaxValue to ensure the lockout end date is set correctly.
if (Options.Lockout.DefaultLockoutTimeSpan == TimeSpan.MaxValue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdykstra review my suggestions please.
Co-authored-by: Rick Anderson <[email protected]>
Co-authored-by: Rick Anderson <[email protected]>
Hi @Rick-Anderson, @tdykstra, I committed changes according to suggestions. Could you please review again? Can you also help fixing build issue? Seems something from platform side. .dotnet\sdk\10.0.100-preview.2.25102.3\NuGet.targets(175,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot create a file when that file already exists. |
…shethaadit/FixBug60181
…t/aspnetcore into shethaadit/FixBug60181
Hi @Rick-Anderson, @tdykstra, can you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for accepting my suggestions. As mentioned previously, I'm only approving the comments. I'm not able to review the code.
…shethaadit/FixBug60181
Enhance Lockout Functionality: Add Test for
AccessFailedAsync
Incrementing CountPR Description:
This PR enhances the test coverage of the lockout functionality in
UserManagerTest.cs
by adding a new test case:AccessFailedAsync_IncrementsAccessFailedCount
AccessFailedAsync
correctly increments the access failed count for a user.Mock<IUserLockoutStore<PocoUser>>
to simulate the behavior of the underlying store.This change improves reliability by validating that lockout mechanisms work as expected, aligning with best practices in identity management.
Testing:
Fixes #60181