This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13e30fe
commit 9ba0d9d
Showing
2 changed files
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,26 @@ use grpc::prelude::*; | |
use grpc_interop::interop_client; | ||
use grpc_interop::test_grpc::TestServiceClient; | ||
|
||
use clap::App; | ||
use clap::Arg; | ||
use clap::{Arg, Command}; | ||
use grpc_interop::DEFAULT_PORT; | ||
|
||
// The flags we use are defined in the gRPC Interopability doc | ||
// https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md | ||
fn main() { | ||
env_logger::init(); | ||
|
||
let options = App::new("gRPC interopability client") | ||
let options = Command::new("gRPC interopability client") | ||
.version("0.1") | ||
.author("Steve Jenson <[email protected]>") | ||
.about("Interoperability Test Client for grpc-rust") | ||
.arg( | ||
Arg::with_name("server_host") | ||
Arg::new("server_host") | ||
.long("server_host") | ||
.help("The server host to connect to. For example, \"localhost\" or \"127.0.0.1\"") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("server_host_override") | ||
Arg::new("server_host_override") | ||
.long("server_host_override") | ||
.help( | ||
"The server host to claim to be connecting to, for use in TLS and HTTP/2 \ | ||
|
@@ -31,43 +30,43 @@ fn main() { | |
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("server_port") | ||
Arg::new("server_port") | ||
.long("server_port") | ||
.help("The server port to connect to. For example, \"8080\"") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("test_case") | ||
Arg::new("test_case") | ||
.long("test_case") | ||
.help("The name of the test case to execute. For example, \"empty_unary\"") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("use_tls") // boolean | ||
Arg::new("use_tls") // boolean | ||
.long("use_tls") | ||
.help("Whether to use a plaintext or encrypted connection") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("use_test_ca") | ||
Arg::new("use_test_ca") | ||
.long("use_test_ca") | ||
.help("Whether to replace platform root CAs with ca.pem as the CA root") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("default_service_account") | ||
Arg::new("default_service_account") | ||
.long("default_service_account") | ||
.help("Email of the GCE default service account.") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("oauth_scope") | ||
Arg::new("oauth_scope") | ||
.long("oauth_scope") | ||
.help("OAuth scope. For example, \"https://www.googleapis.com/auth/xapi.zoo\"") | ||
.takes_value(true), | ||
) | ||
.arg( | ||
Arg::with_name("service_account_key_file") | ||
Arg::new("service_account_key_file") | ||
.long("service_account_key_file") | ||
.help( | ||
"The path to the service account JSON key file generated from GCE developer \ | ||
|