|
|
|
@ -1574,25 +1574,7 @@ TEST_F(XdsGcpAuthnFilterTest, GenerateFilterConfigCacheSizeZero) { |
|
|
|
|
"field:http_filter.value[" |
|
|
|
|
"envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig]" |
|
|
|
|
".cache_config.cache_size " |
|
|
|
|
"error:must be in the range (0, INT64_MAX)]") |
|
|
|
|
<< status; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_F(XdsGcpAuthnFilterTest, GenerateFilterConfigCacheSizeTooBig) { |
|
|
|
|
GcpAuthnFilterConfig proto; |
|
|
|
|
proto.mutable_cache_config()->mutable_cache_size()->set_value(INT64_MAX); |
|
|
|
|
XdsExtension extension = MakeXdsExtension(proto); |
|
|
|
|
auto config = filter_->GenerateFilterConfig("langley", decode_context_, |
|
|
|
|
std::move(extension), &errors_); |
|
|
|
|
absl::Status status = errors_.status(absl::StatusCode::kInvalidArgument, |
|
|
|
|
"errors validating filter config"); |
|
|
|
|
EXPECT_EQ(status.code(), absl::StatusCode::kInvalidArgument); |
|
|
|
|
EXPECT_EQ(status.message(), |
|
|
|
|
"errors validating filter config: [" |
|
|
|
|
"field:http_filter.value[" |
|
|
|
|
"envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig]" |
|
|
|
|
".cache_config.cache_size " |
|
|
|
|
"error:must be in the range (0, INT64_MAX)]") |
|
|
|
|
"error:must be greater than 0]") |
|
|
|
|
<< status; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|