diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/core/channel/channelz_test.cc | 5 | ||||
-rw-r--r-- | test/core/surface/public_headers_must_be_c89.c | 1 | ||||
-rw-r--r-- | test/cpp/util/channel_trace_proto_helper.cc | 5 | ||||
-rw-r--r-- | test/cpp/util/channel_trace_proto_helper.h | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/test/core/channel/channelz_test.cc b/test/core/channel/channelz_test.cc index 5f27320512..4d4b077002 100644 --- a/test/core/channel/channelz_test.cc +++ b/test/core/channel/channelz_test.cc @@ -224,6 +224,11 @@ void ValidateServer(ServerNode* server, validate_channel_data_args args) { grpc::testing::ValidateServerProtoJsonTranslation(json_str); ValidateCounters(json_str, args); gpr_free(json_str); + // also check that the core API formats this the correct way + char* core_api_json_str = grpc_channelz_get_server(server->uuid()); + grpc::testing::ValidateGetServerResponseProtoJsonTranslation( + core_api_json_str); + gpr_free(core_api_json_str); } grpc_millis GetLastCallStartedMillis(CallCountingHelper* channel) { diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 4640b8e4ca..426ef1e8b1 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -137,6 +137,7 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) grpc_resource_quota_arg_vtable); printf("%lx", (unsigned long) grpc_channelz_get_top_channels); printf("%lx", (unsigned long) grpc_channelz_get_servers); + printf("%lx", (unsigned long) grpc_channelz_get_server); printf("%lx", (unsigned long) grpc_channelz_get_server_sockets); printf("%lx", (unsigned long) grpc_channelz_get_channel); printf("%lx", (unsigned long) grpc_channelz_get_subchannel); diff --git a/test/cpp/util/channel_trace_proto_helper.cc b/test/cpp/util/channel_trace_proto_helper.cc index 42a436d49b..ff9d887385 100644 --- a/test/cpp/util/channel_trace_proto_helper.cc +++ b/test/cpp/util/channel_trace_proto_helper.cc @@ -82,6 +82,11 @@ void ValidateGetChannelResponseProtoJsonTranslation(char* json_c_str) { json_c_str); } +void ValidateGetServerResponseProtoJsonTranslation(char* json_c_str) { + VaidateProtoJsonTranslation<grpc::channelz::v1::GetServerResponse>( + json_c_str); +} + void ValidateSubchannelProtoJsonTranslation(char* json_c_str) { VaidateProtoJsonTranslation<grpc::channelz::v1::Subchannel>(json_c_str); } diff --git a/test/cpp/util/channel_trace_proto_helper.h b/test/cpp/util/channel_trace_proto_helper.h index 67c363e89b..4f74e02f10 100644 --- a/test/cpp/util/channel_trace_proto_helper.h +++ b/test/cpp/util/channel_trace_proto_helper.h @@ -26,6 +26,7 @@ void ValidateChannelTraceProtoJsonTranslation(char* json_c_str); void ValidateChannelProtoJsonTranslation(char* json_c_str); void ValidateGetTopChannelsResponseProtoJsonTranslation(char* json_c_str); void ValidateGetChannelResponseProtoJsonTranslation(char* json_c_str); +void ValidateGetServerResponseProtoJsonTranslation(char* json_c_str); void ValidateSubchannelProtoJsonTranslation(char* json_c_str); void ValidateServerProtoJsonTranslation(char* json_c_str); void ValidateGetServersResponseProtoJsonTranslation(char* json_c_str); |