File tree 1 file changed +14
-0
lines changed
gax-java/gax/src/test/java/com/google/api/gax/rpc
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,20 @@ void shouldUseS2A_customEndpointSetViaTransportChannelProvider_returnsFalse() th
508
508
Truth .assertThat (defaultEndpointContextBuilder .shouldUseS2A ()).isFalse ();
509
509
}
510
510
511
+ @ Test
512
+ void shouldUseS2A_mtlsEndpointNull_returnsFalse () throws IOException {
513
+ EnvironmentProvider envProvider = Mockito .mock (EnvironmentProvider .class );
514
+ Mockito .when (envProvider .getenv (EndpointContext .S2A_ENV_ENABLE_USE_S2A )).thenReturn ("true" );
515
+ defaultEndpointContextBuilder =
516
+ defaultEndpointContextBuilder
517
+ .setEnvProvider (envProvider )
518
+ .setClientSettingsEndpoint ("" )
519
+ .setTransportChannelProviderEndpoint ("" )
520
+ .setUsingGDCH (false )
521
+ .setMtlsEndpoint (null );
522
+ Truth .assertThat (defaultEndpointContextBuilder .shouldUseS2A ()).isFalse ();
523
+ }
524
+
511
525
@ Test
512
526
void shouldUseS2A_mtlsEndpointEmpty_returnsFalse () throws IOException {
513
527
EnvironmentProvider envProvider = Mockito .mock (EnvironmentProvider .class );
You can’t perform that action at this time.
0 commit comments