DP-3T / dp3t-sdk-backend

The backend implementation for DP3T
Mozilla Public License 2.0
198 stars 88 forks source link

[WIP] Debug methods for insertmanager #243

Closed ubamrein closed 3 years ago

ubamrein commented 4 years ago

Since the debug controller is used by the calibration app, we update the controller to also use the InsertManager. In order to allow certain debug only feature, a private constructor with a static instance getter function is added. The idea is, to prevent accidentally instantiating the wrong Manager. All functions, which are debug only are suffixed with DEBUG to help signalise a potentially error.

If the debug instance of InsertManager is used with the NONdebug function, a warning is printed. Furthermore the function will raise a NullPointerException when the wrong instance is used with the wrong function, to prevent any potential problems of mixing.

The debug instance of the InsertManager is only used in WSProdConfig and removes filters related to JWTs.

Closes: https://github.com/DP-3T/dp3t-sdk-backend/issues/242

ineiti commented 4 years ago

Do you need that right now? I would prefer to have (finally) #234 in, and then put this PR on top of that...

ubamrein commented 4 years ago

Do you need that right now? I would prefer to have (finally) #234 in, and then put this PR on top of that...

Not right now right now, but soon. But you're right, we should merge #234 in. I added some comments there :)

sonarcloud[bot] commented 4 years ago

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

58.3% 58.3% Coverage
0.0% 0.0% Duplication

martinalig commented 3 years ago

Outdated.