You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version of Microsoft.IdentityModel are you using?
Microsoft.IdentityModel 8.6.0
Where is the issue?
M.IM.JsonWebTokens
M.IM.KeyVaultExtensions
M.IM.Logging
M.IM.ManagedKeyVaultSecurityKey
M.IM.Protocols
M.IM.Protocols.OpenIdConnect
M.IM.Protocols.SignedHttpRequest
M.IM.Protocols.WsFederation
M.IM.TestExtensions
M.IM.Tokens
M.IM.Tokens.Saml
M.IM.Validators
M.IM.Xml
S.IM.Tokens.Jwt
Other (please describe):
Is this a new or an existing app?
The app is in production and I have upgraded to a new version of Microsoft.IdentityModel.
Repro
While fixing issue #3130, I identified that some test data in WriteKeyInfoTheoryData is incorrect, leading to mismatches between the actual and expected results in the WriteKeyInfo test method in the DSigSerializerTests class inside the Microsoft.IdentityModel.Xml.Tests test project.
Code Snippet
[Theory,MemberData(nameof(WriteKeyInfoTheoryData),DisableDiscoveryEnumeration=true)]publicvoidWriteKeyInfo(DSigSerializerTheoryDatatheoryData){TestUtilities.WriteHeader($"{this}.WriteKeyInfo",theoryData);varcontext=newCompareContext($"{this}.WriteKeyInfo, {theoryData.TestId}");try{varkeyInfo=theoryData.Serializer.ReadKeyInfo(XmlUtilities.CreateDictionaryReader(theoryData.Xml));theoryData.ExpectedException.ProcessNoException(context.Diffs);IdentityComparer.AreKeyInfosEqual(keyInfo,theoryData.KeyInfo,context);varms=newMemoryStream();varwriter=XmlDictionaryWriter.CreateTextWriter(ms);theoryData.Serializer.WriteKeyInfo(writer,keyInfo);writer.Flush();varxml=Encoding.UTF8.GetString(ms.ToArray());// FIXME: Test data needs to be corrected because the test data and expected results differ.// Used CompareContext.Default to prevent this test from failing.IdentityComparer.AreEqual(theoryData.Xml,xml,CompareContext.Default);}catch(Exceptionex){theoryData.ExpectedException.ProcessException(ex,context.Diffs);}TestUtilities.AssertFailIfErrors(context);}
Expected behavior
The test should correctly compare the serialized XML output with the expected XML structure. The test data in WriteKeyInfoTheoryData should align with the actual expected results.
Actual behavior
Currently, the test data and expected results do not match, which forces the test to use CompareContext.Default to avoid failure. This indicates that the test data needs to be updated for accurate validation.
Possible solution
Review and update the test data in WriteKeyInfoTheoryData to ensure consistency with the expected serialized XML output.
Remove reliance on CompareContext.Default and use created context to validate the XML structure against the corrected expected results.
Additional context / logs / screenshots / links to code
Which version of Microsoft.IdentityModel are you using?
Microsoft.IdentityModel 8.6.0
Where is the issue?
Is this a new or an existing app?
The app is in production and I have upgraded to a new version of
Microsoft.IdentityModel
.Repro
While fixing issue #3130, I identified that some test data in
WriteKeyInfoTheoryData
is incorrect, leading to mismatches between the actual and expected results in theWriteKeyInfo
test method in theDSigSerializerTests
class inside the Microsoft.IdentityModel.Xml.Tests test project.Code Snippet
Expected behavior
The test should correctly compare the serialized XML output with the expected XML structure. The test data in
WriteKeyInfoTheoryData
should align with the actual expected results.Actual behavior
Currently, the test data and expected results do not match, which forces the test to use
CompareContext.Default
to avoid failure. This indicates that the test data needs to be updated for accurate validation.Possible solution
WriteKeyInfoTheoryData
to ensure consistency with the expected serialized XML output.CompareContext.Default
and use created context to validate the XML structure against the corrected expected results.Additional context / logs / screenshots / links to code
Microsoft.IdentityModel.Xml.Tests
underDSigSerializerTests.cs
.WriteKeyInfoTheoryData
.The text was updated successfully, but these errors were encountered: