Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor header inclusion to speed up building (for test/extensions/filters/network/...) #12051

Merged
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
2 changes: 1 addition & 1 deletion test/extensions/filters/network/client_ssl_auth/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ envoy_extension_cc_test(
deps = [
"//source/common/protobuf:utility_lib",
"//source/extensions/filters/network/client_ssl_auth:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/extensions/filters/network/client_ssl_auth/v3:pkg_cc_proto",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "extensions/filters/network/client_ssl_auth/config.h"
#include "extensions/filters/network/well_known_names.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
10 changes: 5 additions & 5 deletions test/extensions/filters/network/dubbo_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ envoy_extension_cc_test(
":utility_lib",
"//source/extensions/filters/network/dubbo_proxy:config",
"//source/extensions/filters/network/dubbo_proxy/filters:filter_config_interface",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:registry_lib",
"@envoy_api//envoy/extensions/filters/network/dubbo_proxy/v3:pkg_cc_proto",
],
Expand All @@ -112,7 +112,7 @@ envoy_extension_cc_test(
deps = [
"//source/extensions/filters/network/dubbo_proxy:metadata_lib",
"//source/extensions/filters/network/dubbo_proxy/router:route_matcher",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/extensions/filters/network/dubbo_proxy/v3:pkg_cc_proto",
],
)
Expand All @@ -128,7 +128,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/network/dubbo_proxy:dubbo_protocol_impl_lib",
"//source/extensions/filters/network/dubbo_proxy:metadata_lib",
"//source/extensions/filters/network/dubbo_proxy/router:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:registry_lib",
],
)
Expand Down Expand Up @@ -156,7 +156,7 @@ envoy_extension_cc_test(
":mocks_lib",
"//source/extensions/filters/network/dubbo_proxy/filters:well_known_names",
"//source/extensions/filters/network/dubbo_proxy/router:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/extensions/filters/network/dubbo_proxy/router/v3:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -185,7 +185,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/network/dubbo_proxy:dubbo_hessian2_serializer_impl_lib",
"//source/extensions/filters/network/dubbo_proxy:dubbo_protocol_impl_lib",
"//test/common/stats:stat_test_utility_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/extensions/filters/network/dubbo_proxy/v3:pkg_cc_proto",
],
)
2 changes: 1 addition & 1 deletion test/extensions/filters/network/dubbo_proxy/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "extensions/filters/network/dubbo_proxy/filters/filter_config.h"

#include "test/extensions/filters/network/dubbo_proxy/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/registry.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "test/extensions/filters/network/dubbo_proxy/mocks.h"
#include "test/extensions/filters/network/dubbo_proxy/utility.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/printers.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "extensions/filters/network/dubbo_proxy/router/route_matcher.h"
#include "extensions/filters/network/dubbo_proxy/serializer_impl.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "extensions/filters/network/dubbo_proxy/router/config.h"

#include "test/extensions/filters/network/dubbo_proxy/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/dubbo_proxy/router_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "test/extensions/filters/network/dubbo_proxy/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/printers.h"
#include "test/test_common/registry.h"

Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/ext_authz/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.ext_authz",
deps = [
"//source/extensions/filters/network/ext_authz:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/ext_authz/v3:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/ext_authz/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "extensions/filters/network/ext_authz/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/network/http_connection_manager:config",
"//test/integration/filters:encoder_decoder_buffer_filter_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:registry_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "test/mocks/config/mocks.h"
#include "test/mocks/http/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/printers.h"
#include "test/test_common/registry.h"
#include "test/test_common/utility.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/kafka/broker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.kafka_broker",
deps = [
"//source/extensions/filters/network/kafka:kafka_broker_config_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
],
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "extensions/filters/network/kafka/broker/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/mongo_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.mongo_proxy",
deps = [
"//source/extensions/filters/network/mongo_proxy:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/extensions/filters/network/mongo_proxy/v3:pkg_cc_proto",
"@envoy_api//envoy/type/v3:pkg_cc_proto",
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/mongo_proxy/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "extensions/filters/network/mongo_proxy/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/filters/network/ratelimit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.ratelimit",
deps = [
"//source/extensions/filters/network/ratelimit:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/ratelimit/v3:pkg_cc_proto",
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/filters/network/ratelimit/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#include "extensions/filters/network/ratelimit/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/rbac/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.rbac",
deps = [
"//source/extensions/filters/network/rbac:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"@envoy_api//envoy/config/rbac/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/rbac/v3:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/rbac/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "extensions/filters/network/rbac/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "fmt/printf.h"
#include "gmock/gmock.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/redis_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ envoy_extension_cc_test(
deps = [
"//source/common/protobuf:utility_lib",
"//source/extensions/filters/network/redis_proxy:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:test_runtime_lib",
"@envoy_api//envoy/extensions/filters/network/redis_proxy/v3:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/redis_proxy/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "extensions/filters/network/redis_proxy/config.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/test_common/test_runtime.h"

#include "gmock/gmock.h"
Expand Down
14 changes: 7 additions & 7 deletions test/extensions/filters/network/rocketmq_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ envoy_cc_mock(
deps = [
"//source/extensions/filters/network/rocketmq_proxy:config",
"//source/extensions/filters/network/rocketmq_proxy/router:router_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/upstream:upstream_mocks",
],
)
Expand All @@ -31,7 +30,6 @@ envoy_cc_test_library(
hdrs = ["utility.h"],
deps = [
"//source/extensions/filters/network/rocketmq_proxy:config",
"//test/mocks/server:server_mocks",
],
)

Expand All @@ -54,7 +52,7 @@ envoy_extension_cc_test(
":mocks_lib",
":utility_lib",
"//source/extensions/filters/network/rocketmq_proxy:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:utility_lib",
],
)
Expand All @@ -79,7 +77,8 @@ envoy_extension_cc_test(
"//test/common/stats:stat_test_utility_lib",
"//test/common/upstream:utility_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/stream_info:stream_info_mocks",
"//test/test_common:utility_lib",
],
Expand All @@ -93,7 +92,7 @@ envoy_extension_cc_test(
":utility_lib",
"//source/extensions/filters/network/rocketmq_proxy:config",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/mocks/stream_info:stream_info_mocks",
"//test/test_common:utility_lib",
],
Expand All @@ -106,7 +105,8 @@ envoy_extension_cc_test(
deps = [
"//source/extensions/filters/network/rocketmq_proxy:config",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:registry_lib",
"@envoy_api//envoy/extensions/filters/network/rocketmq_proxy/v3:pkg_cc_proto",
],
Expand All @@ -131,7 +131,7 @@ envoy_extension_cc_test(
extension_name = "envoy.filters.network.rocketmq_proxy",
deps = [
"//source/extensions/filters/network/rocketmq_proxy/router:route_matcher",
"//test/mocks/server:server_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/extensions/filters/network/rocketmq_proxy/v3:pkg_cc_proto",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "test/extensions/filters/network/rocketmq_proxy/utility.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
4 changes: 3 additions & 1 deletion test/extensions/filters/network/rocketmq_proxy/codec_test.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "common/common/empty_string.h"
#include "common/common/enum_to_int.h"
#include "common/network/address_impl.h"
#include "common/protobuf/utility.h"

Expand Down Expand Up @@ -794,4 +796,4 @@ TEST_F(RocketmqCodecTest, DecodeTopicFailure) {
} // namespace RocketmqProxy
} // namespace NetworkFilters
} // namespace Extensions
} // namespace Envoy
} // namespace Envoy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#include "extensions/filters/network/rocketmq_proxy/config.h"

#include "test/mocks/local_info/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/registry.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#include "test/extensions/filters/network/rocketmq_proxy/utility.h"
#include "test/mocks/network/connection.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/mocks/server/instance.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/network/rocketmq_proxy/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "extensions/filters/network/rocketmq_proxy/active_message.h"
#include "extensions/filters/network/rocketmq_proxy/conn_manager.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/upstream/mocks.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "extensions/filters/network/rocketmq_proxy/metadata.h"
#include "extensions/filters/network/rocketmq_proxy/router/route_matcher.h"

#include "test/mocks/server/mocks.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down Expand Up @@ -71,4 +71,4 @@ name: default_route
} // namespace RocketmqProxy
} // namespace NetworkFilters
} // namespace Extensions
} // namespace Envoy
} // namespace Envoy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "test/extensions/filters/network/rocketmq_proxy/mocks.h"
#include "test/extensions/filters/network/rocketmq_proxy/utility.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"

#include "gtest/gtest.h"

Expand Down
2 changes: 0 additions & 2 deletions test/extensions/filters/network/rocketmq_proxy/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "extensions/filters/network/rocketmq_proxy/config.h"
#include "extensions/filters/network/rocketmq_proxy/conn_manager.h"

#include "test/mocks/server/mocks.h"

#include "gtest/gtest.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/sni_cluster/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/network/sni_cluster",
"//source/extensions/filters/network/sni_cluster:config",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/mocks/stream_info:stream_info_mocks",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "extensions/filters/network/sni_cluster/sni_cluster.h"

#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/factory_context.h"
#include "test/mocks/stream_info/mocks.h"

#include "gmock/gmock.h"
Expand Down
Loading