diff options
Diffstat (limited to 'test/cpp/interop/client_helper.cc')
-rw-r--r-- | test/cpp/interop/client_helper.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index c171969e14..d3192ad0c9 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -33,8 +33,6 @@ #include "test/cpp/interop/client_helper.h" -#include <unistd.h> - #include <fstream> #include <memory> #include <sstream> @@ -50,8 +48,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 +114,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 |