Extending Interop tests#2642
Conversation
- Client: --use_test_ca, --additional_metadata (with base64 decoding support) - Client: --default_service_account, --oauth_scope, --service_account_key_file - Client: --service_config_json, --google_c2p_universe_domain (parsed/stubbed) - Server: --address_type (ipv4, ipv6, ipv4_ipv6)
mswierq
left a comment
There was a problem hiding this comment.
I have assumed that some of the newly added Opts members are yet unused, since this PR does not provide the interop test cases that cover scenarios that would use those. The main goal here is to provide support for handling all the interop args to be in parity with grpc implementation and the missing test cases will be provided later on?
|
|
||
| let test_cases = matches.test_case; | ||
|
|
||
| let additional_metadata = if let Some(ref am) = matches.additional_metadata { |
There was a problem hiding this comment.
I think Opts should keep Option<MetadataMap>. This parsing code could be implemented as a FromStr trait for MetadataMapWrapper, where MetadataMapWrapper wraps MetadataMap in order to satisfy the orphan rule.
| use tonic::transport::ClientTlsConfig; | ||
| use tonic::transport::Endpoint; | ||
|
|
||
| #[allow(dead_code)] |
There was a problem hiding this comment.
maybe add a comment which members and why are currently unused or apply #[allow(dead_code)] only to the members that are unused and make a general comment why they are currently unused
| format!("result={:?}", result) | ||
| )); | ||
|
|
||
| drop(tx); |
There was a problem hiding this comment.
I do not think that we need an explicit drop here, tx is going out of the scope here and should be dropped automatically. Unless rx is still awaited somehow and the default order of dropping local variables would hang this function. If so, please add a comment to explain it.
| )); | ||
| } | ||
|
|
||
| drop(tx); |
There was a problem hiding this comment.
Please look at the comment here, it seems to be similar situation
Motivation
The current interop client and server test harnesses in Tonic lacked support for several core command-line input parameters defined in the official gRPC interoperability test specification.
Solution
This PR implements all remaining interop test specifications, fully handles network configuration inputs, and enables dynamic ASCII/Binary metadata injection.