Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions test/common/router/config_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4152,13 +4152,9 @@ TEST_F(RoutePropertyTest, TestBadCorsConfig) {
enabled: 0
)EOF";

EXPECT_THROW_WITH_MESSAGE(
EXPECT_THROW_WITH_REGEX(
TestConfigImpl(parseRouteConfigurationFromV2Yaml(yaml), factory_context_, true),
EnvoyException,
"Unable to parse JSON as proto "
"(INVALID_ARGUMENT:(virtual_hosts[0].routes[0].route.cors.enabled.value): invalid value 0 "
"for type TYPE_BOOL): " +
Json::Factory::loadFromYamlString(yaml)->asJsonString());
EnvoyException, "Unable to parse JSON as proto .*: invalid value 0 for type TYPE_BOOL");
}

TEST_F(RouteMatcherTest, Decorator) {
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/http/ratelimit/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TEST(RateLimitFilterConfigTest, BadRateLimitFilterConfig) {

envoy::config::filter::http::rate_limit::v2::RateLimit proto_config{};
EXPECT_THROW_WITH_REGEX(MessageUtil::loadFromYamlAndValidate(yaml, proto_config), EnvoyException,
"INVALID_ARGUMENT:route_key: Cannot find field");
"route_key: Cannot find field");
}

} // namespace
Expand Down