Skip to content

Commit

Permalink
add test both params null.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Dec 21, 2024
1 parent 8a2d967 commit ce74e45
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ public void buildTokenUrl_nullBindingEnforcement() {
assertEquals(TOKEN_URL + "?transport=mtls", softBoundTokenUrl);
}

@Test
public void buildTokenUrl_nullTransport_nullBindingEnforcement() {
ComputeEngineCredentials credentials =
ComputeEngineCredentials.newBuilder()
.setAuthTransport(null)
.setBindingEnforcement(null)
.build();
String softBoundTokenUrl = credentials.createTokenUrlWithScopes();

assertEquals(TOKEN_URL, softBoundTokenUrl);
}

@Test
public void buildTokenUrlSoftMtlsBound_mtls_transport() {
ComputeEngineCredentials credentials =
Expand Down

0 comments on commit ce74e45

Please sign in to comment.