Skip to content

Commit

Permalink
Use EXPECT_THROW_WITH_MESSAGE for resolver tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Konradi <akonradi@google.com>
  • Loading branch information
akonradi committed Oct 12, 2017
1 parent 0236b12 commit 915c7d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/common/network/resolver_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ TEST(ResolverTest, NonStandardResolver) {

TEST(ResolverTest, UninitializedAddress) {
envoy::api::v2::Address address;
EXPECT_THROW(resolveProtoAddress(address), EnvoyException);
EXPECT_THROW_WITH_MESSAGE(resolveProtoAddress(address), EnvoyException,
"Address must be a socket or pipe: ");
}

TEST(ResolverTest, NoSuchResolver) {
Expand All @@ -141,7 +142,8 @@ TEST(ResolverTest, NoSuchResolver) {
socket->set_address("foo");
socket->set_port_value(5);
socket->set_resolver_name("envoy.test.resolver");
EXPECT_THROW(resolveProtoAddress(address), EnvoyException);
EXPECT_THROW_WITH_MESSAGE(resolveProtoAddress(address), EnvoyException,
"Unknown address resolver: envoy.test.resolver");
}

} // namespace Address
Expand Down

0 comments on commit 915c7d3

Please sign in to comment.