alts: add ComputeEngineChannelBuilder to interop test (#5475)

* alts: add ComputeEngineChannelBuilder to interop test

* alts: rename to compute_engine_channel_creds
This commit is contained in:
Jiangtao Li 2019-03-13 18:50:08 -07:00 committed by GitHub
parent 283f04983b
commit 185cf3d047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import com.google.common.annotations.VisibleForTesting;
import com.google.common.io.Files;
import io.grpc.ManagedChannel;
import io.grpc.alts.AltsChannelBuilder;
import io.grpc.alts.ComputeEngineChannelBuilder;
import io.grpc.alts.GoogleDefaultChannelBuilder;
import io.grpc.internal.AbstractManagedChannelImplBuilder;
import io.grpc.internal.GrpcUtil;
@ -373,6 +374,10 @@ public class TestServiceClient {
&& customCredentialsType.equals("google_default_credentials")) {
return GoogleDefaultChannelBuilder.forAddress(serverHost, serverPort).build();
}
if (customCredentialsType != null
&& customCredentialsType.equals("compute_engine_channel_creds")) {
return ComputeEngineChannelBuilder.forAddress(serverHost, serverPort).build();
}
if (useAlts) {
return AltsChannelBuilder.forAddress(serverHost, serverPort).build();
}