Skip to content

Commit

Permalink
Fix proto errors
Browse files Browse the repository at this point in the history
Signed-off-by: Venil Noronha <[email protected]>
  • Loading branch information
venilnoronha committed Sep 15, 2018
1 parent 9c55555 commit 9dadee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions source/common/tcp_proxy/tcp_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Config::Route::Route(
Config::WeightedClusterEntry::WeightedClusterEntry(
const envoy::config::filter::network::tcp_proxy::v2::TcpProxy::WeightedCluster::ClusterWeight&
config)
: cluster_name_(config.name()), cluster_weight_(PROTOBUF_GET_WRAPPED_REQUIRED(config, weight)) {
}
: cluster_name_(config.name()), cluster_weight_(config.weight()) {}

Config::SharedConfig::SharedConfig(
const envoy::config::filter::network::tcp_proxy::v2::TcpProxy& config,
Expand Down
6 changes: 3 additions & 3 deletions test/common/tcp_proxy/tcp_proxy_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,12 @@ TEST_F(TcpProxyTest, WeightedClusters) {
envoy::config::filter::network::tcp_proxy::v2::TcpProxy::WeightedCluster::ClusterWeight*
cluster1 = config.mutable_weighted_clusters()->mutable_clusters()->Add();
cluster1->set_name("cluster1");
cluster1->mutable_weight()->set_value(10);
cluster1->set_weight(10);

envoy::config::filter::network::tcp_proxy::v2::TcpProxy::WeightedCluster::ClusterWeight*
cluster2 = config.mutable_weighted_clusters()->mutable_clusters()->Add();
cluster2->set_name("cluster2");
cluster2->mutable_weight()->set_value(90);
cluster2->set_weight(90);

configure(config);

Expand All @@ -506,7 +506,7 @@ TEST_F(TcpProxyTest, DefaultRoutes) {
envoy::config::filter::network::tcp_proxy::v2::TcpProxy::WeightedCluster::ClusterWeight*
ignored_cluster = config.mutable_weighted_clusters()->mutable_clusters()->Add();
ignored_cluster->set_name("ignored_cluster");
ignored_cluster->mutable_weight()->set_value(10);
ignored_cluster->set_weight(10);

configure(config);

Expand Down

0 comments on commit 9dadee9

Please sign in to comment.