aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/client_helper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/interop/client_helper.cc')
-rw-r--r--test/cpp/interop/client_helper.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc
index 4041f95abc..29b5a1ed6c 100644
--- a/test/cpp/interop/client_helper.cc
+++ b/test/cpp/interop/client_helper.cc
@@ -35,6 +35,7 @@
#include "test/cpp/util/create_test_channel.h"
#include "test/cpp/util/test_credentials_provider.h"
+DECLARE_bool(use_alts);
DECLARE_bool(use_tls);
DECLARE_string(custom_credentials_type);
DECLARE_bool(use_test_ca);
@@ -103,8 +104,10 @@ std::shared_ptr<Channel> CreateChannelForTestCase(
GPR_ASSERT(creds);
}
if (FLAGS_custom_credentials_type.empty()) {
+ transport_security security_type =
+ FLAGS_use_alts ? ALTS : (FLAGS_use_tls ? TLS : INSECURE);
return CreateTestChannel(host_port, FLAGS_server_host_override,
- FLAGS_use_tls, !FLAGS_use_test_ca, creds);
+ security_type, !FLAGS_use_test_ca, creds);
} else {
return CreateTestChannel(host_port, FLAGS_custom_credentials_type, creds);
}