diff options
author | 2015-10-12 14:08:10 -0700 | |
---|---|---|
committer | 2015-10-12 14:09:13 -0700 | |
commit | e5adc0eb67f27ea3a01945dd549952e4aaa7bbd0 (patch) | |
tree | 0e5b3fbaa14ab5ba115207f27b361b5506eca7d8 /test/cpp/util | |
parent | 54a902ed17a69c671e5212b115fe5f219654240a (diff) |
Fixing Cpp tests.
Diffstat (limited to 'test/cpp/util')
-rw-r--r-- | test/cpp/util/cli_call_test.cc | 3 | ||||
-rw-r--r-- | test/cpp/util/create_test_channel.cc | 11 | ||||
-rw-r--r-- | test/cpp/util/create_test_channel.h | 2 | ||||
-rw-r--r-- | test/cpp/util/grpc_cli.cc | 4 |
4 files changed, 11 insertions, 9 deletions
diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 9c8d59987e..32cd8e4103 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -89,7 +89,8 @@ class CliCallTest : public ::testing::Test { void TearDown() GRPC_OVERRIDE { server_->Shutdown(); } void ResetStub() { - channel_ = CreateChannel(server_address_.str(), InsecureCredentials()); + channel_ = + CreateChannel(server_address_.str(), InsecureChannelCredentials()); stub_ = grpc::cpp::test::util::TestService::NewStub(channel_); } diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index f0d5bfc7eb..0cd9f9e767 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -58,13 +58,14 @@ 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<Credentials>& creds) { + const std::shared_ptr<CallCredentials>& creds) { ChannelArguments channel_args; if (enable_ssl) { const char* roots_certs = use_prod_roots ? "" : test_root_cert; SslCredentialsOptions ssl_opts = {roots_certs, "", ""}; - std::shared_ptr<Credentials> channel_creds = SslCredentials(ssl_opts); + std::shared_ptr<ChannelCredentials> channel_creds = + SslCredentials(ssl_opts); if (!server.empty() && !override_hostname.empty()) { channel_args.SetSslTargetNameOverride(override_hostname); @@ -72,11 +73,11 @@ std::shared_ptr<Channel> CreateTestChannel( const grpc::string& connect_to = server.empty() ? override_hostname : server; if (creds.get()) { - channel_creds = CompositeCredentials(creds, channel_creds); + channel_creds = CompositeChannelCredentials(channel_creds, creds); } return CreateCustomChannel(connect_to, channel_creds, channel_args); } else { - return CreateChannel(server, InsecureCredentials()); + return CreateChannel(server, InsecureChannelCredentials()); } } @@ -84,7 +85,7 @@ 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<Credentials>()); + use_prod_roots, std::shared_ptr<CallCredentials>()); } // Shortcut for end2end and interop tests. diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index a4750689a0..b50d653de3 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -51,7 +51,7 @@ 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<Credentials>& creds); + const std::shared_ptr<CallCredentials>& creds); } // namespace grpc diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 334b6efb6a..3f40b242fc 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -148,9 +148,9 @@ int main(int argc, char** argv) { std::stringstream input_stream; input_stream << input_file.rdbuf(); - std::shared_ptr<grpc::Credentials> creds; + std::shared_ptr<grpc::ChannelCredentials> creds; if (!FLAGS_enable_ssl) { - creds = grpc::InsecureCredentials(); + creds = grpc::InsecureChannelCredentials(); } else { if (FLAGS_use_auth) { creds = grpc::GoogleDefaultCredentials(); |