xDS Interop Client changes for PSM security tests (#25613)
This commit is contained in:
parent
a2697e4592
commit
4b9ec936e8
28
BUILD
28
BUILD
|
|
@ -357,6 +357,22 @@ grpc_cc_library(
|
|||
|
||||
grpc_cc_library(
|
||||
name = "grpc++",
|
||||
language = "c++",
|
||||
select_deps = {
|
||||
"grpc_no_xds": [],
|
||||
"//conditions:default": [
|
||||
"grpc++_xds_client",
|
||||
"grpc++_xds_server",
|
||||
],
|
||||
},
|
||||
standalone = True,
|
||||
deps = [
|
||||
"grpc++_internals",
|
||||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "grpc++_internals",
|
||||
srcs = [
|
||||
"src/cpp/client/insecure_credentials.cc",
|
||||
"src/cpp/client/secure_credentials.cc",
|
||||
|
|
@ -382,14 +398,6 @@ grpc_cc_library(
|
|||
],
|
||||
language = "c++",
|
||||
public_hdrs = GRPCXX_PUBLIC_HDRS,
|
||||
select_deps = {
|
||||
"grpc_no_xds": [],
|
||||
"//conditions:default": [
|
||||
"grpc++_xds_client",
|
||||
"grpc++_xds_server",
|
||||
],
|
||||
},
|
||||
standalone = True,
|
||||
deps = [
|
||||
"gpr",
|
||||
"grpc",
|
||||
|
|
@ -411,7 +419,7 @@ grpc_cc_library(
|
|||
],
|
||||
language = "c++",
|
||||
deps = [
|
||||
"grpc++_base",
|
||||
"grpc++_internals",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -428,7 +436,7 @@ grpc_cc_library(
|
|||
"include/grpcpp/xds_server_builder.h",
|
||||
],
|
||||
deps = [
|
||||
"grpc++_base",
|
||||
"grpc++_internals",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ ABSL_FLAG(std::string, rpc, "UnaryCall",
|
|||
ABSL_FLAG(std::string, metadata, "", "metadata to send with the RPC.");
|
||||
ABSL_FLAG(std::string, expect_status, "OK",
|
||||
"RPC status for the test RPC to be considered successful");
|
||||
ABSL_FLAG(std::string, security, "none",
|
||||
"If set to \"secure\", XdsCredentials are used");
|
||||
|
||||
using grpc::Channel;
|
||||
using grpc::ClientAsyncResponseReader;
|
||||
|
|
@ -460,9 +462,13 @@ class XdsUpdateClientConfigureServiceImpl
|
|||
void RunTestLoop(std::chrono::duration<double> duration_per_query,
|
||||
StatsWatchers* stats_watchers,
|
||||
RpcConfigurationsQueue* rpc_configs_queue) {
|
||||
TestClient client(grpc::CreateChannel(absl::GetFlag(FLAGS_server),
|
||||
grpc::InsecureChannelCredentials()),
|
||||
stats_watchers);
|
||||
TestClient client(
|
||||
grpc::CreateChannel(absl::GetFlag(FLAGS_server),
|
||||
absl::GetFlag(FLAGS_security) == "secure"
|
||||
? grpc::experimental::XdsCredentials(
|
||||
grpc::InsecureChannelCredentials())
|
||||
: grpc::InsecureChannelCredentials()),
|
||||
stats_watchers);
|
||||
std::chrono::time_point<std::chrono::system_clock> start =
|
||||
std::chrono::system_clock::now();
|
||||
std::chrono::duration<double> elapsed;
|
||||
|
|
|
|||
Loading…
Reference in New Issue