File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed
s2a/src/test/java/io/grpc/s2a Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change 2323import io .grpc .InsecureChannelCredentials ;
2424import io .grpc .TlsChannelCredentials ;
2525import java .io .File ;
26- import java .io .IOException ;
2726import org .junit .Test ;
2827import org .junit .runner .RunWith ;
2928import org .junit .runners .JUnit4 ;
@@ -129,17 +128,8 @@ private static ChannelCredentials getTlsChannelCredentials() throws Exception {
129128 String certChainPath = "src/test/resources/client_cert.pem" ;
130129 String trustBundlePath = "src/test/resources/root_cert.pem" ;
131130 File privateKeyFile = new File (privateKeyPath );
132- if (!privateKeyFile .exists ()) {
133- throw new IOException (privateKeyPath + " does not exist" );
134- }
135131 File certChainFile = new File (certChainPath );
136- if (!certChainFile .exists ()) {
137- throw new IOException (certChainPath + " does not exist" );
138- }
139132 File trustBundleFile = new File (trustBundlePath );
140- if (!trustBundleFile .exists ()) {
141- throw new IOException (trustBundlePath + " does not exist" );
142- }
143133 return TlsChannelCredentials .newBuilder ()
144134 .keyManager (certChainFile , privateKeyFile )
145135 .trustManager (trustBundleFile )
Original file line number Diff line number Diff line change 4545import io .netty .handler .ssl .SslProvider ;
4646import java .io .ByteArrayInputStream ;
4747import java .io .File ;
48- import java .io .IOException ;
4948import java .util .concurrent .FutureTask ;
5049import java .util .logging .Logger ;
5150import javax .net .ssl .SSLException ;
@@ -210,17 +209,8 @@ public void clientCommunicateUsingMtlsToS2ACredentials_succeeds() throws Excepti
210209 String certChainPath = "src/test/resources/client_cert.pem" ;
211210 String trustBundlePath = "src/test/resources/root_cert.pem" ;
212211 File privateKeyFile = new File (privateKeyPath );
213- if (!privateKeyFile .exists ()) {
214- throw new IOException (privateKeyPath + " does not exist" );
215- }
216212 File certChainFile = new File (certChainPath );
217- if (!certChainFile .exists ()) {
218- throw new IOException (certChainPath + " does not exist" );
219- }
220213 File trustBundleFile = new File (trustBundlePath );
221- if (!trustBundleFile .exists ()) {
222- throw new IOException (trustBundlePath + " does not exist" );
223- }
224214 ChannelCredentials s2aChannelCredentials =
225215 TlsChannelCredentials .newBuilder ()
226216 .keyManager (certChainFile , privateKeyFile )
You can’t perform that action at this time.
0 commit comments