[CSHARP-1552] Tests under CSharp515Tests fail when assemblies are signed Created: 01/Feb/16  Updated: 19/Oct/16  Resolved: 11/Mar/16

Status: Closed
Project: C# Driver
Component/s: Testing
Affects Version/s: 2.2.2
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: James Hadwen Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

If the Mongo driver assemblies are signed then tests CSharp515Tests.TestLength0/1/2 fail. This is because the testing type S<> is now a "signed" type and will emit a different full-name in JSON other than that specified in the expectation.

It's quite convoluted to recreate this. But steps are

  • Change all InternalsVisibleTo attributes to contain the public key (as when signed must reference signed)
  • Either:
    • Modify each library project file to sign the assembly
    • Add to properties collection in build.fsx
      • "SignAssembly", "true"
      • "AssemblyOriginatorKeyFile", <path to key file>
  • Run unit tests

It's almost too trivial to report, but given that this is the only test that fails and the fix is so simple it might make sense to patch (pull incoming).



 Comments   
Comment by Githook User [ 11/Mar/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1552: Refactor tests so that they also pass when assemblies are signed.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/0e1b58b3803a6077eb4976b06aab086a99f15e1b

Comment by Githook User [ 11/Mar/16 ]

Author:

{u'username': u'jhadwen', u'name': u'James Hadwen', u'email': u'james.hadwen@sociustec.com'}

Message: CSHARP-1552: Tests under CSharp515Tests fail when assemblies are signed
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/26ba467f5bbc9734294bf20d2f0c635625893c3a

Generated at Wed Feb 07 21:39:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.