Remove dependencies and tests that are not needed for CA / SSL
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 300
- Forks
- 230
- Ø Merge
- 5 T. 1 Std.
- Gemergte PRs (30 T.)
- 5
Beschreibung
Expected Behavior
The SDK shouldn't include test dependencies to test the behavior of other libraries or functionality that is out of the scope from the SDK.
Actual Behavior
This PR:
Added the following dependencies that are not needed and we shouldn't have in the SDK:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.70</version>
<scope>test</scope>
</dependency>
It also added complex tests in the following Test class:
sdk/src/test/java/io/dapr/utils/NetworkUtilsTest.java
These tests are not necessary here because the SDK is not responsible for checking that the certificates are correctly generated. We should only test and assert that the certificates are set if the correct properties are set.
Also, all the previously existing tests are now adding the channel to an ArrayList, I would love to know the reason for doing that, this should be removed if it is not serving any purpose.
Steps to Reproduce the Problem
Release Note
RELEASE NOTE:
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Überprüfung der Dependency-Deklarationen für die Bouncy Castle-Testbibliotheken und von sdk/src/test/java/io/dapr/utils/NetworkUtilsTest.java. Überprüfe die zertifikatsbezogenen Assertions und die vorhandenen Tests, die Channels zu einer ArrayList hinzufügen, und verifiziere anschließend, dass nur das Verhalten der zertifikatbezogenen Eigenschaften im Besitz des SDK weiterhin abgedeckt ist und die unnötigen Dependencies und der Testcode entfernt wurden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- security, testing
- Issue-Typ
- Refactoring
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100