-
Notifications
You must be signed in to change notification settings - Fork 499
Conversation
@@ -44,6 +46,9 @@ class DscSignatureValidatorTest : BaseTest() { | |||
every { dscRepository.dscData } returns flowOf(dscData) | |||
every { securityProvider.setup() } just Runs | |||
|
|||
// Add RSA algorithm in unit tests context. | |||
Security.addProvider(BouncyCastleProvider()) |
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.
Does this need to removed again?
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.
No, it will stay. SecurityProvider.setup() should NOT be mocked ,but the crypto stuff from org.conscrypt.*
is not available for unit testing. we could use an openJDK implementation ,but it is not really worth it for one unit test, more information here. google/conscrypt#649
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.
For the actual App SecurityProvider
will be doing that ,but it is not a issue for the real app
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.
lgtm
Kudos, SonarCloud Quality Gate passed! |
https://github.com/corona-warn-app/cwa-app-tech-spec/commit/4ff61c569e15cb52615c1635c8c795674af322a1