Skip to content

Commit

Permalink
test createPlaintextS2AChannelCredentials.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Nov 12, 2024
1 parent a42dcbd commit 56551c6
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,20 @@ private FixedHeaderProvider getHeaderProviderWithApiKeyHeader() {
return FixedHeaderProvider.create(header);
}

@Test
void createPlaintextToS2AChannelCredentials_emptyPlaintextAddress_returnsNull() {
InstantiatingGrpcChannelProvider provider =
InstantiatingGrpcChannelProvider.newBuilder().build();
assertThat(provider.createPlaintextToS2AChannelCredentials("")).isNull();
}

@Test
void createPlaintextToS2AChannelCredentials_success() {
InstantiatingGrpcChannelProvider provider =
InstantiatingGrpcChannelProvider.newBuilder().build();
assertThat(provider.createPlaintextToS2AChannelCredentials("localhost:8080")).isNotNull();
}

@Test
void createMtlsToS2AChannelCredentials_missingAllFiles_throws() throws IOException {
InstantiatingGrpcChannelProvider provider =
Expand Down

0 comments on commit 56551c6

Please sign in to comment.