Skip to content

Commit

Permalink
test: remove superfluous test dependencies (envoyproxy#11912)
Browse files Browse the repository at this point in the history
Commit Message: remove superfluous includes
Additional Description: The monolith mock library mocks/server/mocks.h is included by several tests but never used. Remove them to speed up building phase
Risk Level: low
Testing: existing tests
Docs Changes: N/A
Release Notes: no
Related Issues: envoyproxy#10917

Signed-off-by: Muge Chen <mugechen@google.com>
  • Loading branch information
foreseeable authored and jwendell committed Jul 24, 2020
1 parent cdf7bbe commit d1ed2a3
Show file tree
Hide file tree
Showing 24 changed files with 13 additions and 28 deletions.
3 changes: 2 additions & 1 deletion test/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ envoy_cc_test(
"//source/common/protobuf:utility_lib",
"//source/extensions/common/crypto:utility_lib",
"//test/mocks/event:event_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/init:init_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down
3 changes: 2 additions & 1 deletion test/common/config/datasource_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#include "common/protobuf/protobuf.h"

#include "test/mocks/event/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/init/mocks.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/test_common/utility.h"

Expand Down
4 changes: 1 addition & 3 deletions test/common/network/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ envoy_cc_test(
"//test/mocks/buffer:buffer_mocks",
"//test/mocks/event:event_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/stats:stats_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
Expand Down Expand Up @@ -189,10 +188,10 @@ envoy_cc_test(
"//source/common/network:listener_lib",
"//source/common/network:utility_lib",
"//source/common/stats:stats_lib",
"//source/common/stream_info:stream_info_lib",
"//test/common/network:listener_impl_test_base_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:utility_lib",
Expand All @@ -213,7 +212,6 @@ envoy_cc_test(
"//source/common/stats:stats_lib",
"//test/common/network:listener_impl_test_base_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
Expand Down
1 change: 0 additions & 1 deletion test/common/network/connection_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "test/mocks/buffer/mocks.h"
#include "test/mocks/event/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/stats/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
Expand Down
2 changes: 1 addition & 1 deletion test/common/network/listener_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "common/network/address_impl.h"
#include "common/network/listener_impl.h"
#include "common/network/utility.h"
#include "common/stream_info/stream_info_impl.h"

#include "test/common/network/listener_impl_test_base.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/test_runtime.h"
Expand Down
1 change: 0 additions & 1 deletion test/common/network/udp_listener_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "test/common/network/listener_impl_test_base.h"
#include "test/mocks/api/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/threadsafe_singleton_injector.h"
Expand Down
1 change: 0 additions & 1 deletion test/extensions/clusters/aggregate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ envoy_extension_cc_test(
"//test/integration:http_integration_lib",
"//test/integration:integration_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:resources_lib",
"//test/test_common:utility_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "test/common/grpc/grpc_client_integration.h"
#include "test/integration/http_integration.h"
#include "test/integration/utility.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/resources.h"
#include "test/test_common/simulated_time_system.h"
Expand Down
1 change: 0 additions & 1 deletion test/extensions/common/proxy_protocol/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ envoy_cc_test(
"//source/server:connection_handler_lib",
"//test/mocks/buffer:buffer_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:utility_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include "test/mocks/buffer/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/utility.h"
Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/http/jwt_authn/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ envoy_extension_cc_test(
deps = [
":mock_lib",
"//source/extensions/filters/http/jwt_authn:filter_lib",
"//test/mocks/server:server_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/extensions/filters/http/jwt_authn/v3:pkg_cc_proto",
],
Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/http/jwt_authn/filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "extensions/filters/http/well_known_names.h"

#include "test/extensions/filters/http/jwt_authn/mock.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/network/rocketmq_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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 "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
1 change: 0 additions & 1 deletion test/extensions/filters/udp/dns_filter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ envoy_cc_fuzz_test(
deps = [
"//source/extensions/filters/udp/dns_filter:dns_filter_lib",
"//test/fuzz:utility_lib",
"//test/mocks/server:server_mocks",
"//test/test_common:environment_lib",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "test/fuzz/fuzz_runner.h"
#include "test/fuzz/utility.h"
#include "test/mocks/event/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/environment.h"

#include "gmock/gmock.h"
Expand Down
2 changes: 0 additions & 2 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ envoy_cc_test(
"//source/common/protobuf:utility_lib",
"//test/common/grpc:grpc_client_integration_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:resources_lib",
"//test/test_common:utility_lib",
Expand Down Expand Up @@ -223,7 +222,6 @@ envoy_cc_test(
"//source/common/protobuf:utility_lib",
"//test/common/grpc:grpc_client_integration_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:resources_lib",
"//test/test_common:utility_lib",
Expand Down
1 change: 0 additions & 1 deletion test/integration/cds_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "test/common/grpc/grpc_client_integration.h"
#include "test/integration/http_integration.h"
#include "test/integration/utility.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/resources.h"
#include "test/test_common/simulated_time_system.h"
Expand Down
1 change: 0 additions & 1 deletion test/integration/sds_dynamic_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "test/integration/server.h"
#include "test/integration/ssl_utility.h"
#include "test/mocks/secret/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/resources.h"
#include "test/test_common/test_time_system.h"
Expand Down
1 change: 0 additions & 1 deletion test/integration/sds_static_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "test/integration/server.h"
#include "test/integration/ssl_utility.h"
#include "test/mocks/secret/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/test_time_system.h"
#include "test/test_common/utility.h"
Expand Down
1 change: 0 additions & 1 deletion test/integration/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "test/integration/integration.h"
#include "test/integration/utility.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/environment.h"

#include "absl/strings/str_replace.h"
Expand Down
1 change: 0 additions & 1 deletion test/integration/vhds_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "test/common/grpc/grpc_client_integration.h"
#include "test/integration/http_integration.h"
#include "test/integration/utility.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/resources.h"
#include "test/test_common/simulated_time_system.h"
Expand Down
3 changes: 2 additions & 1 deletion test/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ envoy_cc_test(
srcs = ["connection_handler_test.cc"],
deps = [
"//source/common/common:utility_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:connection_balancer_lib",
"//source/common/stats:stats_lib",
"//source/server:active_raw_udp_listener_config",
"//source/server:connection_handler_lib",
"//test/mocks/api:api_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down
3 changes: 2 additions & 1 deletion test/server/connection_handler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "envoy/stats/scope.h"

#include "common/common/utility.h"
#include "common/config/utility.h"
#include "common/network/address_impl.h"
#include "common/network/connection_balancer_impl.h"
#include "common/network/io_socket_handle_impl.h"
Expand All @@ -14,9 +15,9 @@

#include "server/connection_handler_impl.h"

#include "test/mocks/api/mocks.h"
#include "test/mocks/common.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/threadsafe_singleton_injector.h"

Expand Down

0 comments on commit d1ed2a3

Please sign in to comment.