aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/grpclb/grpclb_api_test.cc
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-04-25 12:35:58 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-04-25 16:48:26 -0700
commit7f0793ad623ae1dd2b175306a0e7eb060d53511b (patch)
tree6119b27622c4be79a2206e3428e52c4fbe1eb34a /test/cpp/grpclb/grpclb_api_test.cc
parentd64be98091c66f81c30de9c2a32825ee8eda97fd (diff)
Updated load balancer proto to v1
Diffstat (limited to 'test/cpp/grpclb/grpclb_api_test.cc')
-rw-r--r--test/cpp/grpclb/grpclb_api_test.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc
index 92f93c869c..bf77878e0a 100644
--- a/test/cpp/grpclb/grpclb_api_test.cc
+++ b/test/cpp/grpclb/grpclb_api_test.cc
@@ -35,13 +35,13 @@
#include <string>
#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
-#include "src/proto/grpc/lb/v0/load_balancer.pb.h" // C++ version
+#include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version
namespace grpc {
namespace {
-using grpc::lb::v0::LoadBalanceRequest;
-using grpc::lb::v0::LoadBalanceResponse;
+using grpc::lb::v1::LoadBalanceRequest;
+using grpc::lb::v1::LoadBalanceResponse;
class GrpclbTest : public ::testing::Test {};
@@ -60,9 +60,7 @@ TEST_F(GrpclbTest, CreateRequest) {
TEST_F(GrpclbTest, ParseResponse) {
LoadBalanceResponse response;
- const std::string client_config_str = "I'm a client config";
auto* initial_response = response.mutable_initial_response();
- initial_response->set_client_config(client_config_str);
auto* client_stats_report_interval =
initial_response->mutable_client_stats_report_interval();
client_stats_report_interval->set_seconds(123);
@@ -73,10 +71,7 @@ TEST_F(GrpclbTest, ParseResponse) {
gpr_slice_from_copied_string(encoded_response.c_str());
grpc_grpclb_response* c_response = grpc_grpclb_response_parse(encoded_slice);
EXPECT_TRUE(c_response->has_initial_response);
- EXPECT_TRUE(c_response->initial_response.has_client_config);
EXPECT_FALSE(c_response->initial_response.has_load_balancer_delegate);
- EXPECT_TRUE(strcmp(c_response->initial_response.client_config,
- client_config_str.c_str()) == 0);
EXPECT_EQ(c_response->initial_response.client_stats_report_interval.seconds,
123);
EXPECT_EQ(c_response->initial_response.client_stats_report_interval.nanos,