Skip to content

Commit

Permalink
resolve dependencies (envoyproxy#12052)
Browse files Browse the repository at this point in the history
Commit Message: refactor header inclusion to speed up building
Additional Description:
Risk Level: low
Testing: exsiting tests
Docs Changes: N/A
Release Notes: no
Related Issues: envoyproxy#10917

Signed-off-by: Muge Chen <mugechen@google.com>
Signed-off-by: scheler <santosh.cheler@appdynamics.com>
  • Loading branch information
foreseeable authored and scheler committed Aug 4, 2020
1 parent 1aa04da commit 33fb953
Show file tree
Hide file tree
Showing 35 changed files with 57 additions and 38 deletions.
5 changes: 4 additions & 1 deletion test/config_test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ envoy_cc_test_library(
"//source/server:configuration_lib",
"//source/server/config_validation:server_lib",
"//test/integration:integration_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/server:worker_factory_mocks",
"//test/mocks/server:listener_component_factory_mocks",
"//test/mocks/server:worker_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/test_common:threadsafe_singleton_injector_lib",
"//test/test_common:simulated_time_system_lib",
Expand Down
5 changes: 4 additions & 1 deletion test/config_test/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#include "server/options_impl.h"

#include "test/integration/server.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/server/listener_component_factory.h"
#include "test/mocks/server/worker.h"
#include "test/mocks/server/worker_factory.h"
#include "test/mocks/ssl/mocks.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/threadsafe_singleton_injector.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/access_loggers/file/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ envoy_extension_cc_test(
extension_name = "envoy.access_loggers.file",
deps = [
"//source/extensions/access_loggers/file:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:factory_context_mocks",
"//test/test_common:environment_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/accesslog/v3:pkg_cc_proto",
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/access_loggers/file/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "extensions/access_loggers/file/file_access_log_impl.h"
#include "extensions/access_loggers/well_known_names.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
2 changes: 1 addition & 1 deletion test/extensions/access_loggers/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ envoy_extension_cc_test(
extension_name = "envoy.access_loggers.http_grpc",
deps = [
"//source/extensions/access_loggers/grpc:http_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/access_loggers/grpc/v3:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/access_loggers/grpc/http_config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "extensions/access_loggers/grpc/http_grpc_access_log_impl.h"
#include "extensions/access_loggers/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
5 changes: 3 additions & 2 deletions test/extensions/clusters/aggregate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ envoy_extension_cc_test(
"//source/extensions/transport_sockets/raw_buffer:config",
"//test/common/upstream:utility_lib",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/test_common:environment_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand All @@ -40,7 +41,7 @@ envoy_extension_cc_test(
"//test/common/upstream:test_cluster_manager",
"//test/common/upstream:utility_lib",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/test_common:environment_lib",
"//test/test_common:simulated_time_system_lib",
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/clusters/aggregate/cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#include "test/common/upstream/utility.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"
#include "test/test_common/environment.h"

Expand Down
2 changes: 1 addition & 1 deletion test/extensions/clusters/aggregate/cluster_update_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "test/common/upstream/test_cluster_manager.h"
#include "test/common/upstream/utility.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/ssl/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/simulated_time_system.h"
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/clusters/dynamic_forward_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ envoy_extension_cc_test(
"//test/common/upstream:utility_lib",
"//test/extensions/common/dynamic_forward_proxy:mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/test_common:environment_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "test/common/upstream/utility.h"
#include "test/extensions/common/dynamic_forward_proxy/mocks.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"
#include "test/test_common/environment.h"

Expand Down
3 changes: 2 additions & 1 deletion test/extensions/clusters/redis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ envoy_extension_cc_test(
"//test/mocks/network:network_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/thread_local:thread_local_mocks",
"//test/mocks/upstream:upstream_mocks",
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/clusters/redis/redis_cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include "test/extensions/filters/network/common/redis/mocks.h"
#include "test/mocks/local_info/mocks.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"

using testing::_;
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/listener/http_inspector/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/listener/http_inspector:http_inspector_lib",
"//test/mocks/api:api_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:listener_factory_context_mocks",
"//test/mocks/stats:stats_mocks",
"//test/test_common:threadsafe_singleton_injector_lib",
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "extensions/filters/listener/http_inspector/http_inspector.h"
#include "extensions/filters/listener/well_known_names.h"

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

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/listener/original_src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ envoy_extension_cc_test(
"//source/extensions/filters/listener/original_src:config",
"//source/extensions/filters/listener/original_src:config_lib",
"//source/extensions/filters/listener/original_src:original_src_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:listener_factory_context_mocks",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "extensions/filters/listener/original_src/original_src.h"
#include "extensions/filters/listener/original_src/original_src_config_factory.h"

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

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/filters/listener/proxy_protocol/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ envoy_extension_cc_test(
"//test/mocks/api:api_mocks",
"//test/mocks/buffer:buffer_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:listener_factory_context_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "test/mocks/api/mocks.h"
#include "test/mocks/buffer/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/listener_factory_context.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/printers.h"
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/filters/udp/dns_filter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ envoy_extension_cc_test(
deps = [
":dns_filter_test_lib",
"//source/extensions/filters/udp/dns_filter:dns_filter_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/server:listener_factory_context_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/test_common:environment_lib",
"@envoy_api//envoy/extensions/filters/udp/dns_filter/v3alpha:pkg_cc_proto",
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/filters/udp/dns_filter/dns_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#include "common/common/logger.h"

#include "test/mocks/event/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/server/listener_factory_context.h"
#include "test/test_common/environment.h"
#include "test/test_common/simulated_time_system.h"

Expand Down
3 changes: 2 additions & 1 deletion test/extensions/health_checkers/redis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ envoy_extension_cc_test(
"//source/common/upstream:health_checker_lib",
"//source/extensions/health_checkers/redis:config",
"//test/common/upstream:utility_lib",
"//test/mocks/access_log:access_log_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:health_checker_factory_context_mocks",
"//test/mocks/upstream:upstream_mocks",
"@envoy_api//envoy/extensions/filters/network/redis_proxy/v3:pkg_cc_proto",
],
Expand Down
3 changes: 2 additions & 1 deletion test/extensions/health_checkers/redis/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
#include "extensions/health_checkers/redis/config.h"

#include "test/common/upstream/utility.h"
#include "test/mocks/access_log/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/health_checker_factory_context.h"
#include "test/mocks/upstream/mocks.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/quic_listeners/quiche/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ envoy_cc_test(
"//source/extensions/quic_listeners/quiche:envoy_quic_utils_lib",
"//source/server:configuration_lib",
"//test/mocks/network:network_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:network_utility_lib",
"//test/test_common:simulated_time_system_lib",
"@com_googlesource_quiche//:quic_test_tools_crypto_server_config_peer_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/environment.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"

#include "test/mocks/runtime/mocks.h"
#include "test/test_common/utility.h"
#include "test/test_common/network_utility.h"
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/stats_sinks/dog_statsd/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ envoy_extension_cc_test(
"//include/envoy/registry",
"//source/common/protobuf:utility_lib",
"//source/extensions/stat_sinks/dog_statsd:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:utility_lib",
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/stats_sinks/dog_statsd/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "extensions/stat_sinks/dog_statsd/config.h"
#include "extensions/stat_sinks/well_known_names.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/utility.h"
Expand Down
6 changes: 4 additions & 2 deletions test/extensions/stats_sinks/hystrix/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ envoy_extension_cc_test(
"//include/envoy/registry",
"//source/common/protobuf:utility_lib",
"//source/extensions/stat_sinks/hystrix:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:utility_lib",
Expand All @@ -34,7 +34,9 @@ envoy_extension_cc_test(
deps = [
"//source/common/stats:stats_lib",
"//source/extensions/stat_sinks/hystrix:hystrix_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:admin_stream_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/stats:stats_mocks",
"//test/mocks/upstream:upstream_mocks",
],
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/stats_sinks/hystrix/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "extensions/stat_sinks/hystrix/hystrix.h"
#include "extensions/stat_sinks/well_known_names.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/utility.h"
Expand Down
4 changes: 3 additions & 1 deletion test/extensions/stats_sinks/hystrix/hystrix_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#include "extensions/stat_sinks/hystrix/hystrix.h"

#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/server/admin_stream.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/stats/mocks.h"
#include "test/mocks/upstream/mocks.h"

Expand Down
2 changes: 1 addition & 1 deletion test/extensions/stats_sinks/statsd/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ envoy_extension_cc_test(
"//include/envoy/registry",
"//source/common/protobuf:utility_lib",
"//source/extensions/stat_sinks/statsd:config",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:utility_lib",
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/stats_sinks/statsd/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "extensions/stat_sinks/statsd/config.h"
#include "extensions/stat_sinks/well_known_names.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/environment.h"
#include "test/test_common/network_utility.h"
#include "test/test_common/utility.h"
Expand Down
2 changes: 1 addition & 1 deletion test/tools/router_check/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ envoy_cc_test_library(
"//source/common/router:config_lib",
"//source/common/stats:stats_lib",
"//source/exe:platform_impl_lib",
"//test/mocks/server:server_mocks",
"//test/mocks/server:instance_mocks",
"//test/test_common:printers_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down
2 changes: 0 additions & 2 deletions test/tools/router_check/coverage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "envoy/config/route/v3/route.pb.h"
#include "envoy/router/router.h"

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

namespace Envoy {
class RouteCoverage : Logger::Loggable<Logger::Id::testing> {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/tools/router_check/router.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "common/router/config_impl.h"
#include "common/stats/fake_symbol_table_impl.h"

#include "test/mocks/server/mocks.h"
#include "test/mocks/server/instance.h"
#include "test/test_common/global.h"
#include "test/test_common/printers.h"
#include "test/test_common/utility.h"
Expand Down

0 comments on commit 33fb953

Please sign in to comment.