Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dhi Aurrahman <[email protected]>
  • Loading branch information
dio committed Aug 13, 2018
1 parent 80b5498 commit 6c263d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/integration/ads_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ class AdsIntegrationTest : public AdsIntegrationBaseTest,
envoy::api::v2::DiscoveryRequest discovery_request;
VERIFY_ASSERTION(ads_stream_->waitForGrpcMessage(*dispatcher_, discovery_request));

ASSERT(discovery_request.has_node());
EXPECT_FALSE(discovery_request.node().id().empty());
EXPECT_FALSE(discovery_request.node().cluster().empty());

// TODO(PiotrSikora): Remove this hack once fixed internally.
if (!(expected_type_url == discovery_request.type_url())) {
return AssertionFailure() << fmt::format("type_url {} does not match expected {}",
Expand Down
3 changes: 3 additions & 0 deletions test/integration/load_stats_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ class LoadStatsIntegrationTest : public HttpIntegrationTest,
return;
} else if (loadstats_request.cluster_stats_size() == 0) {
loadstats_request.CopyFrom(local_loadstats_request);
ASSERT(loadstats_request.has_node());
EXPECT_FALSE(loadstats_request.node().id().empty());
EXPECT_FALSE(loadstats_request.node().cluster().empty());
return;
}

Expand Down

0 comments on commit 6c263d3

Please sign in to comment.