diff options
Diffstat (limited to 'test/cpp/interop')
-rw-r--r-- | test/cpp/interop/client.cc | 8 | ||||
-rw-r--r-- | test/cpp/interop/client_helper.cc | 14 | ||||
-rw-r--r-- | test/cpp/interop/interop_client.cc | 3 | ||||
-rw-r--r-- | test/cpp/interop/interop_test.cc | 1 | ||||
-rw-r--r-- | test/cpp/interop/server.cc | 2 | ||||
-rw-r--r-- | test/cpp/interop/server_helper.cc | 4 |
6 files changed, 15 insertions, 17 deletions
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 58c71cca35..dbe29395b4 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -45,7 +45,7 @@ #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/test_config.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_bool(use_prod_roots, false, "True to use SSL roots for google"); DEFINE_int32(server_port, 0, "Server port."); DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); @@ -143,11 +143,11 @@ int main(int argc, char** argv) { client.DoEmptyStream(); client.DoStatusWithMessage(); // service_account_creds and jwt_token_creds can only run with ssl. - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { grpc::string json_key = GetServiceAccountJsonKey(); client.DoJwtTokenCreds(json_key); - client.DoOauth2AuthToken( - FLAGS_default_service_account, FLAGS_oauth_scope); + client.DoOauth2AuthToken(FLAGS_default_service_account, + FLAGS_oauth_scope); client.DoPerRpcCreds(json_key); } // compute_engine_creds only runs in GCE. diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index f85aa6ad8e..cbad21e318 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -51,7 +51,7 @@ #include "test/core/security/oauth2_utils.h" #include "test/cpp/util/create_test_channel.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); DECLARE_bool(use_prod_roots); DECLARE_int32(server_port); DECLARE_string(server_host); @@ -99,27 +99,27 @@ std::shared_ptr<Channel> CreateChannelForTestCase( if (test_case == "compute_engine_creds") { std::shared_ptr<Credentials> creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); creds = GoogleComputeEngineCredentials(); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "jwt_token_creds") { std::shared_ptr<Credentials> creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); creds = ServiceAccountJWTAccessCredentials(json_key, token_lifetime.count()); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "oauth2_auth_token") { grpc::string raw_token = GetOauth2AccessToken(); std::shared_ptr<Credentials> creds = AccessTokenCredentials(raw_token); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else { return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots); + FLAGS_use_tls, FLAGS_use_prod_roots); } } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 02e10a50aa..5169945762 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -203,8 +203,7 @@ void InteropClient::DoOauth2AuthToken(const grpc::string& username, } void InteropClient::DoPerRpcCreds(const grpc::string& json_key) { - gpr_log(GPR_INFO, - "Sending a unary rpc with per-rpc JWT access token ..."); + gpr_log(GPR_INFO, "Sending a unary rpc with per-rpc JWT access token ..."); SimpleRequest request; SimpleResponse response; request.set_fill_username(true); diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index f01b032e95..faf6698903 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -55,7 +55,6 @@ extern "C" { #include "src/core/support/string.h" } - int test_client(const char* root, const char* host, int port) { int status; pid_t cli; diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 03b6532447..c0e1ec943d 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -54,7 +54,7 @@ #include "test/proto/empty.grpc.pb.h" #include "test/proto/messages.grpc.pb.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_int32(port, 0, "Server port."); using grpc::Server; diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 015198354e..4570750846 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -41,13 +41,13 @@ #include "src/core/surface/call.h" #include "test/core/end2end/data/ssl_test_data.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); namespace grpc { namespace testing { std::shared_ptr<ServerCredentials> CreateInteropServerCredentials() { - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, test_server1_cert}; SslServerCredentialsOptions ssl_opts; |