diff options
author | Bogdan Drutu <bdrutu@google.com> | 2016-04-06 14:09:59 -0700 |
---|---|---|
committer | Bogdan Drutu <bdrutu@google.com> | 2016-04-06 14:09:59 -0700 |
commit | b40693ef995fdb44149ef146ccb21f687bd9fd04 (patch) | |
tree | 82e8f842e18c81c90562aeb8dbfc170d01d83f1d /test/cpp/util/create_test_channel.cc | |
parent | 552aecd0e2045c9e38333e3c5f112c1a7f6c35cc (diff) | |
parent | 39a96967f1b003391b02317bf7c6fb003edc4722 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/cpp/util/create_test_channel.cc')
-rw-r--r-- | test/cpp/util/create_test_channel.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index 0cd9f9e767..fe8b5d5423 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,8 +58,9 @@ namespace grpc { std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots, - const std::shared_ptr<CallCredentials>& creds) { - ChannelArguments channel_args; + const std::shared_ptr<CallCredentials>& creds, + const ChannelArguments& args) { + ChannelArguments channel_args(args); if (enable_ssl) { const char* roots_certs = use_prod_roots ? "" : test_root_cert; SslCredentialsOptions ssl_opts = {roots_certs, "", ""}; @@ -83,6 +84,14 @@ std::shared_ptr<Channel> CreateTestChannel( std::shared_ptr<Channel> CreateTestChannel( const grpc::string& server, const grpc::string& override_hostname, + bool enable_ssl, bool use_prod_roots, + const std::shared_ptr<CallCredentials>& creds) { + return CreateTestChannel(server, override_hostname, enable_ssl, + use_prod_roots, creds, ChannelArguments()); +} + +std::shared_ptr<Channel> CreateTestChannel( + const grpc::string& server, const grpc::string& override_hostname, bool enable_ssl, bool use_prod_roots) { return CreateTestChannel(server, override_hostname, enable_ssl, use_prod_roots, std::shared_ptr<CallCredentials>()); |