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.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc
index c171969e14..91564e5dce 100644
--- a/test/cpp/interop/client_helper.cc
+++ b/test/cpp/interop/client_helper.cc
@@ -50,8 +50,10 @@
#include "src/cpp/client/secure_credentials.h"
#include "test/core/security/oauth2_utils.h"
#include "test/cpp/util/create_test_channel.h"
+#include "test/cpp/util/test_credentials_provider.h"
DECLARE_bool(use_tls);
+DECLARE_string(custom_credentials_type);
DECLARE_bool(use_test_ca);
DECLARE_int32(server_port);
DECLARE_string(server_host);
@@ -114,8 +116,12 @@ std::shared_ptr<Channel> CreateChannelForTestCase(
creds = AccessTokenCredentials(raw_token);
GPR_ASSERT(creds);
}
- return CreateTestChannel(host_port, FLAGS_server_host_override, FLAGS_use_tls,
- !FLAGS_use_test_ca, creds);
+ if (FLAGS_custom_credentials_type.empty()) {
+ return CreateTestChannel(host_port, FLAGS_server_host_override,
+ FLAGS_use_tls, !FLAGS_use_test_ca, creds);
+ } else {
+ return CreateTestChannel(host_port, FLAGS_custom_credentials_type, creds);
+ }
}
} // namespace testing