dapr / dapr/java-sdk

Remove dependencies and tests that are not needed for CA / SSL

Aperta
#1,364 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
kind/bug
Lingua principale
Java
Stelle
300
Fork
230
Merge medio
5g 1h
PR unite (30g)
5

Descrizione

## 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:

[](https://github.com/dapr/java-sdk/commit/daf4c8b7030f963110f29b3c08ade14babd83c33)

Added the following dependencies that are not needed and we shouldn't have in the SDK:

```

org.bouncycastle
bcprov-jdk15on
1.70
test


org.bouncycastle
bcpkix-jdk15on
1.70
test

```
It also added complex tests in the following Test class:

[sdk/src/test/java/io/dapr/utils/NetworkUtilsTest.java](https://github.com/dapr/java-sdk/commit/daf4c8b7030f963110f29b3c08ade14babd83c33#diff-b7c65e0352b8116b33b92da139dac5fd3527fb1672f592c180a1b560651f0c78)

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:

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando le dichiarazioni delle dipendenze per le librerie di test Bouncy Castle e sdk/src/test/java/io/dapr/utils/NetworkUtilsTest.java. Controlla le asserzioni relative ai certificati e i test esistenti che aggiungono canali a una ArrayList, quindi verifica che rimanga coperto solo il comportamento delle proprietà dei certificati di proprietà dell'SDK e che le dipendenze e il codice di test non necessari siano stati rimossi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
security, testing
Tipo di issue
Refactoring
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.