better test_case flag help formating

pull/6839/head
David Garcia Quintas 9 years ago
parent c61c235fac
commit 34f1b555ae
  1. 96
      test/cpp/interop/client.cc

@ -54,34 +54,31 @@ DEFINE_string(server_host, "127.0.0.1", "Server host to connect to");
DEFINE_string(server_host_override, "foo.test.google.fr", DEFINE_string(server_host_override, "foo.test.google.fr",
"Override the server host which is sent in HTTP header"); "Override the server host which is sent in HTTP header");
DEFINE_string(test_case, "large_unary", DEFINE_string(test_case, "large_unary",
"Configure different test cases. Valid options are: " "Configure different test cases. Valid options are:\n\n"
"empty_unary : empty (zero bytes) request and response; " "all : all test cases;\n"
"large_unary : single request and (large) response; " "cancel_after_begin : cancel stream after starting it;\n"
"cancel_after_first_response: cancel on first response;\n"
"client_compressed_unary : single compressed request; "
"server_compressed_unary : single compressed response; "
"client_streaming : request streaming with single response; "
"server_streaming : single request with response streaming; "
"client_compressed_streaming : compressed request streaming with " "client_compressed_streaming : compressed request streaming with "
"single response; " "client_compressed_unary : single compressed request;\n"
"client_streaming : request streaming with single response;\n"
"compute_engine_creds: large_unary with compute engine auth;\n"
"custom_metadata: server will echo custom metadata;\n"
"empty_stream : bi-di stream with no request/response;\n"
"empty_unary : empty (zero bytes) request and response;\n"
"half_duplex : half-duplex streaming;\n"
"jwt_token_creds: large_unary with JWT token auth;\n"
"large_unary : single request and (large) response;\n"
"oauth2_auth_token: raw oauth2 access token auth;\n"
"per_rpc_creds: raw oauth2 access token on a single rpc;\n"
"ping_pong : full-duplex streaming;\n"
"response streaming;\n"
"server_compressed_streaming : single request with compressed " "server_compressed_streaming : single request with compressed "
"response streaming; " "server_compressed_unary : single compressed response;\n"
"slow_consumer : single request with response; " "server_streaming : single request with response streaming;\n"
" streaming with slow client consumer; " "slow_consumer : single request with response streaming with "
"half_duplex : half-duplex streaming; " "slow client consumer;\n"
"ping_pong : full-duplex streaming; " "status_code_and_message: verify status code & message;\n"
"cancel_after_begin : cancel stream after starting it; " "timeout_on_sleeping_server: deadline exceeds on stream;\n");
"cancel_after_first_response: cancel on first response; "
"timeout_on_sleeping_server: deadline exceeds on stream; "
"empty_stream : bi-di stream with no request/response; "
"compute_engine_creds: large_unary with compute engine auth; "
"jwt_token_creds: large_unary with JWT token auth; "
"oauth2_auth_token: raw oauth2 access token auth; "
"per_rpc_creds: raw oauth2 access token on a single rpc; "
"status_code_and_message: verify status code & message; "
"custom_metadata: server will echo custom metadata;"
"all : all of above.");
DEFINE_string(default_service_account, "", DEFINE_string(default_service_account, "",
"Email of GCE default service account"); "Email of GCE default service account");
DEFINE_string(service_account_key_file, "", DEFINE_string(service_account_key_file, "",
@ -178,30 +175,29 @@ int main(int argc, char** argv) {
} }
// compute_engine_creds only runs in GCE. // compute_engine_creds only runs in GCE.
} else { } else {
const char* testcases[] = const char* testcases[] = {"all",
{ "all", "cancel_after_begin",
"cancel_after_begin", "cancel_after_first_response",
"cancel_after_first_response", "client_compressed_streaming",
"client_compressed_streaming", "client_compressed_unary",
"client_compressed_unary", "client_streaming",
"client_streaming", "compute_engine_creds",
"compute_engine_creds", "custom_metadata",
"custom_metadata", "empty_stream",
"empty_stream", "empty_unary",
"empty_unary", "half_duplex",
"half_duplex", "jwt_token_creds",
"jwt_token_creds", "large_unary",
"large_unary", "oauth2_auth_token",
"oauth2_auth_token", "oauth2_auth_token",
"oauth2_auth_token", "per_rpc_creds",
"per_rpc_creds", "per_rpc_creds",
"per_rpc_creds", "ping_pong",
"ping_pong", "server_compressed_streaming",
"server_compressed_streaming", "server_compressed_unary",
"server_compressed_unary", "server_streaming",
"server_streaming", "status_code_and_message",
"status_code_and_message", "timeout_on_sleeping_server"};
"timeout_on_sleeping_server"};
char* joined_testcases = char* joined_testcases =
gpr_strjoin_sep(testcases, GPR_ARRAY_SIZE(testcases), "\n", NULL); gpr_strjoin_sep(testcases, GPR_ARRAY_SIZE(testcases), "\n", NULL);

Loading…
Cancel
Save