diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/security/credentials_test.cc | 22 | ||||
-rw-r--r-- | test/cpp/common/channel_arguments_test.cc | 3 | ||||
-rw-r--r-- | test/cpp/interop/client.cc | 2 | ||||
-rw-r--r-- | test/cpp/interop/stress_test.cc | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index b3a8161786..b655535335 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -465,14 +465,14 @@ static void test_oauth2_google_iam_composite_creds(void) { google_iam_creds->Unref(); GPR_ASSERT(strcmp(composite_creds->type(), GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); - const grpc_call_credentials_array& creds_array = + const grpc_composite_call_credentials::CallCredentialsList& creds_list = static_cast<const grpc_composite_call_credentials*>(composite_creds) ->inner(); - GPR_ASSERT(creds_array.size() == 2); - GPR_ASSERT(strcmp(creds_array.get(0)->type(), - GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); - GPR_ASSERT( - strcmp(creds_array.get(1)->type(), GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); + GPR_ASSERT(creds_list.size() == 2); + GPR_ASSERT(strcmp(creds_list[0]->type(), GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == + 0); + GPR_ASSERT(strcmp(creds_list[1]->type(), GRPC_CALL_CREDENTIALS_TYPE_IAM) == + 0); run_request_metadata_test(composite_creds, auth_md_ctx, state); composite_creds->Unref(); } @@ -492,13 +492,13 @@ class check_channel_oauth2_google_iam final : public grpc_channel_credentials { GPR_ASSERT(call_creds != nullptr); GPR_ASSERT( strcmp(call_creds->type(), GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); - const grpc_call_credentials_array& creds_array = + const grpc_composite_call_credentials::CallCredentialsList& creds_list = static_cast<const grpc_composite_call_credentials*>(call_creds.get()) ->inner(); - GPR_ASSERT(strcmp(creds_array.get(0)->type(), - GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); - GPR_ASSERT(strcmp(creds_array.get(1)->type(), - GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); + GPR_ASSERT( + strcmp(creds_list[0]->type(), GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + GPR_ASSERT(strcmp(creds_list[1]->type(), GRPC_CALL_CREDENTIALS_TYPE_IAM) == + 0); return nullptr; } }; diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index 183d2afa78..12fd9784f4 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -209,6 +209,9 @@ TEST_F(ChannelArgumentsTest, SetSocketMutator) { channel_args_.SetSocketMutator(mutator0); EXPECT_TRUE(HasArg(arg0)); + // Exercise the copy constructor because we ran some sanity checks in it. + grpc::ChannelArguments new_args{channel_args_}; + channel_args_.SetSocketMutator(mutator1); EXPECT_TRUE(HasArg(arg1)); // arg0 is replaced by arg1 diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index a4b1a85f85..08aad0b011 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -38,7 +38,7 @@ DEFINE_string(custom_credentials_type, "", "User provided credentials type."); DEFINE_bool(use_test_ca, false, "False to use SSL roots for google"); DEFINE_int32(server_port, 0, "Server port."); DEFINE_string(server_host, "localhost", "Server host to connect to"); -DEFINE_string(server_host_override, "foo.test.google.fr", +DEFINE_string(server_host_override, "", "Override the server host which is sent in HTTP header"); DEFINE_string( test_case, "large_unary", diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index ebbd14beba..3e00980a26 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -103,7 +103,7 @@ DEFINE_bool(use_alts, false, "Whether to use alts. Enable alts will disable tls."); DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_bool(use_test_ca, false, "False to use SSL roots for google"); -DEFINE_string(server_host_override, "foo.test.google.fr", +DEFINE_string(server_host_override, "", "Override the server host which is sent in HTTP header"); using grpc::testing::ALTS; |