-
Notifications
You must be signed in to change notification settings - Fork 373
Add ResetStateForTest API for test #5489
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
base: rginsburg/msiv2_feature_branch
Are you sure you want to change the base?
Conversation
src/client/Microsoft.Identity.Client/Instance/Discovery/INetworkCacheMetadataProvider.cs
Show resolved
Hide resolved
UserAssignedIdentityId identity2Type = UserAssignedIdentityId.ClientId; | ||
string identity2Id = TestConstants.ClientId2; |
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.
Set identity2Type
equal to the userAssignedIdentityId
param from the DataRow.
You'll need to includeidentity2Id
in the DataRow so that a ResourceId and ObjectId can be used instead of ClientId every time.
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.
Done for the type.
I don't think the ID needs to set to some specific value based on the type. The ID is just a string, so as long as it's different from Identity1, it fits the purpose of this test.
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.
Sure. But maybe we should rename the constant to something else, because using TestConstants.ClientId2
for theresourceId
and objectId
types is confusing. Could you at least include your above comment in the code?
The ID is just a string, so as long as it's different from Identity1, it fits the purpose of this test.
tests/Microsoft.Identity.Test.Unit/ManagedIdentityTests/ImdsV2Tests.cs
Outdated
Show resolved
Hide resolved
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.
Please address my comments before merging
c328889
to
321e9d2
Compare
Note: this is a large PR due to refactoring of existing tests. Mostly not worth reviewing. Pls review only product code and code on which I have added comments.