diff --git a/test/extensions/retry/host/omit_canary_hosts/config_test.cc b/test/extensions/retry/host/omit_canary_hosts/config_test.cc index 4794aefa32a1..20f94af2320a 100644 --- a/test/extensions/retry/host/omit_canary_hosts/config_test.cc +++ b/test/extensions/retry/host/omit_canary_hosts/config_test.cc @@ -36,6 +36,17 @@ TEST(OmitCanaryHostsRetryPredicateTest, PredicateTest) { ASSERT_TRUE(predicate->shouldSelectAnotherHost(*host2)); } +TEST(OmitCanaryHostsRetryPredicateTest, EmptyConfig) { + auto factory = Registry::FactoryRegistry::getFactory( + RetryHostPredicateValues::get().OmitCanaryHostsPredicate); + + ASSERT_NE(nullptr, factory); + + ProtobufTypes::MessagePtr config = factory->createEmptyConfigProto(); + EXPECT_TRUE(dynamic_cast( + config.get())); +} + } // namespace } // namespace Host } // namespace Retry diff --git a/test/extensions/retry/host/omit_host_metadata/config_test.cc b/test/extensions/retry/host/omit_host_metadata/config_test.cc index 69a2b47e8e3d..f69394bac9d7 100644 --- a/test/extensions/retry/host/omit_host_metadata/config_test.cc +++ b/test/extensions/retry/host/omit_host_metadata/config_test.cc @@ -82,6 +82,8 @@ TEST(OmitHostsRetryPredicateTest, PredicateTest) { )EOF")))); ASSERT_FALSE(predicate->shouldSelectAnotherHost(*host)); + + predicate->onHostAttempted(host); } } // namespace } // namespace Host diff --git a/test/extensions/retry/host/previous_hosts/config_test.cc b/test/extensions/retry/host/previous_hosts/config_test.cc index 5e83f445f63a..84ccaad32a69 100644 --- a/test/extensions/retry/host/previous_hosts/config_test.cc +++ b/test/extensions/retry/host/previous_hosts/config_test.cc @@ -48,6 +48,17 @@ TEST(PreviousHostsRetryPredicateConfigTest, PredicateTest) { ASSERT_TRUE(predicate->shouldSelectAnotherHost(*host2)); } +TEST(PreviousHostsRetryPredicateConfigTest, EmptyConfig) { + auto factory = Registry::FactoryRegistry::getFactory( + RetryHostPredicateValues::get().PreviousHostsPredicate); + + ASSERT_NE(nullptr, factory); + + ProtobufTypes::MessagePtr config = factory->createEmptyConfigProto(); + EXPECT_TRUE(dynamic_cast( + config.get())); +} + } // namespace } // namespace Host } // namespace Retry diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index 521d5c6760ff..e06bf489cb07 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -3,37 +3,37 @@ # directory:coverage_percent # for existing extensions with low coverage. declare -a KNOWN_LOW_COVERAGE=( -"source/extensions/common:94.0" +"source/extensions/common:94.4" "source/extensions/common/crypto:91.5" "source/extensions/common/wasm:85.4" -"source/extensions/common/wasm/null:77.8" "source/extensions/common/wasm/v8:85.4" -"source/extensions/filters/common:94.6" -"source/extensions/filters/common/expr:92.2" -"source/extensions/filters/common/fault:95.8" -"source/extensions/filters/common/lua:95.9" -"source/extensions/filters/common/rbac:87.2" -"source/extensions/filters/http/aws_lambda:96.4" -"source/extensions/filters/http/aws_request_signing:93.3" +"source/extensions/common/wasm/null:77.8" +"source/extensions/filters/network/sni_cluster:90.3" +"source/extensions/filters/network/thrift_proxy/router:96.0" +"source/extensions/filters/network/sni_dynamic_forward_proxy:90.9" +"source/extensions/filters/network/dubbo_proxy:96.1" +"source/extensions/filters/network/dubbo_proxy/router:95.1" +"source/extensions/filters/network/direct_response:89.3" +"source/extensions/filters/network/mongo_proxy:94.0" +"source/extensions/filters/network/common:96.1" +"source/extensions/filters/network/common/redis:96.2" +"source/extensions/filters/http/dynamic_forward_proxy:92.1" "source/extensions/filters/http/cache:80.7" "source/extensions/filters/http/cache/simple_http_cache:84.5" -"source/extensions/filters/http/dynamic_forward_proxy:91.5" -"source/extensions/filters/http/grpc_json_transcoder:93.3" "source/extensions/filters/http/ip_tagging:91.2" -"source/extensions/filters/listener:95.6" -"source/extensions/filters/listener/http_inspector:93.3" +"source/extensions/filters/http/grpc_json_transcoder:93.3" +"source/extensions/filters/http/aws_lambda:96.4" +"source/extensions/filters/http/aws_request_signing:93.3" +"source/extensions/filters/listener:96.0" "source/extensions/filters/listener/tls_inspector:92.4" -"source/extensions/filters/network/common:96.0" -"source/extensions/filters/network/common/redis:96.2" -"source/extensions/filters/network/direct_response:89.3" -"source/extensions/filters/network/dubbo_proxy:96.1" -"source/extensions/filters/network/dubbo_proxy/router:95.1" -"source/extensions/filters/network/mongo_proxy:94.0" -"source/extensions/filters/network/sni_cluster:90.3" -"source/extensions/filters/network/sni_dynamic_forward_proxy:89.4" -"source/extensions/filters/network/thrift_proxy/router:96.0" -"source/extensions/filters/udp:91.0" -"source/extensions/filters/udp/dns_filter:88.5" +"source/extensions/filters/listener/http_inspector:93.3" +"source/extensions/filters/udp:91.1" +"source/extensions/filters/udp/dns_filter:89.2" +"source/extensions/filters/common:94.7" +"source/extensions/filters/common/expr:92.2" +"source/extensions/filters/common/rbac:87.2" +"source/extensions/filters/common/fault:95.8" +"source/extensions/filters/common/lua:95.9" "source/extensions/grpc_credentials:92.0" "source/extensions/grpc_credentials/aws_iam:86.8" "source/extensions/health_checkers:95.9" @@ -42,13 +42,11 @@ declare -a KNOWN_LOW_COVERAGE=( "source/extensions/quic_listeners/quiche:84.8" "source/extensions/retry:95.5" "source/extensions/retry/host:85.7" -"source/extensions/retry/host/omit_canary_hosts:64.3" -"source/extensions/retry/host/previous_hosts:82.4" "source/extensions/stat_sinks/statsd:85.2" -"source/extensions/tracers:96.3" -"source/extensions/tracers/opencensus:90.1" +"source/extensions/tracers:96.5" +"source/extensions/tracers/opencensus:92.4" "source/extensions/tracers/xray:95.3" -"source/extensions/transport_sockets:94.8" +"source/extensions/transport_sockets:94.9" "source/extensions/transport_sockets/tap:95.6" "source/extensions/transport_sockets/tls:94.2" "source/extensions/transport_sockets/tls/private_key:76.9"