Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
81 changes: 61 additions & 20 deletions test/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ envoy_cc_test(
"//source/common/protobuf:utility_lib",
"//source/common/upstream:cds_api_lib",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:cluster_priority_set_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand All @@ -36,6 +37,13 @@ envoy_cc_test(
],
deps = [
":test_cluster_manager",
"//test/mocks/upstream:cds_api_mocks",
"//test/mocks/upstream:cluster_priority_set_mocks",
"//test/mocks/upstream:cluster_real_priority_set_mocks",
"//test/mocks/upstream:cluster_update_callbacks_mocks",
"//test/mocks/upstream:health_checker_mocks",
"//test/mocks/upstream:load_balancer_context_mock",
"//test/mocks/upstream:thread_aware_load_balancer_mocks",
"@envoy_api//envoy/admin/v3:pkg_cc_proto",
"@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand All @@ -48,7 +56,8 @@ envoy_cc_test(
srcs = ["cluster_update_tracker_test.cc"],
deps = [
"//source/common/upstream:cluster_update_tracker_lib",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:thread_local_cluster_mocks",
],
)

Expand Down Expand Up @@ -88,7 +97,8 @@ envoy_cc_test(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:health_checker_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down Expand Up @@ -118,7 +128,7 @@ envoy_cc_benchmark_binary(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down Expand Up @@ -146,12 +156,18 @@ envoy_cc_test(
"//source/common/upstream:health_checker_lib",
"//source/common/upstream:upstream_lib",
"//test/common/http:common_lib",
"//test/mocks:common_lib",
"//test/mocks/access_log:access_log_mocks",
"//test/mocks/api:api_mocks",
"//test/mocks/http:http_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:cluster_priority_set_mocks",
"//test/mocks/upstream:health_check_event_logger_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:transport_socket_match_mocks",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
Expand All @@ -178,7 +194,7 @@ envoy_cc_test(
"//source/common/upstream:host_utility_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
],
)

Expand All @@ -191,8 +207,12 @@ envoy_cc_test(
"//source/common/upstream:load_balancer_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks:common_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:load_balancer_context_mock",
"//test/mocks/upstream:priority_set_mocks",
"//test/test_common:logging_lib",
"//test/test_common:test_runtime_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand All @@ -210,7 +230,9 @@ envoy_cc_test(
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:priority_set_mocks",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
Expand All @@ -226,7 +248,8 @@ envoy_cc_test(
"//test/mocks/event:event_mocks",
"//test/mocks/grpc:grpc_mocks",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:cluster_priority_set_mocks",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
Expand All @@ -248,7 +271,9 @@ envoy_cc_test(
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_factory_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down Expand Up @@ -277,7 +302,7 @@ envoy_cc_test(
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/thread_local:thread_local_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand All @@ -302,7 +327,7 @@ envoy_cc_test(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
],
Expand All @@ -319,10 +344,14 @@ envoy_cc_test(
"//source/common/upstream:outlier_detection_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks:common_lib",
"//test/mocks/access_log:access_log_mocks",
"//test/mocks/event:event_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:cluster_priority_set_mocks",
"//test/mocks/upstream:host_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand Down Expand Up @@ -365,8 +394,11 @@ envoy_cc_test(
"//source/common/upstream:ring_hash_lb_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks:common_lib",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:priority_set_mocks",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
],
)
Expand All @@ -377,7 +409,10 @@ envoy_cc_test(
deps = [
":utility_lib",
"//source/common/upstream:maglev_lb_lib",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks:common_lib",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:priority_set_mocks",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
],
)
Expand All @@ -394,7 +429,7 @@ envoy_cc_benchmark_binary(
"//source/common/upstream:ring_hash_lb_lib",
"//source/common/upstream:upstream_lib",
"//test/common/upstream:utility_lib",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/test_common:printers_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
],
Expand All @@ -417,10 +452,15 @@ envoy_cc_test(
"//source/common/upstream:subset_lb_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//test/mocks:common_lib",
"//test/mocks/access_log:access_log_mocks",
"//test/mocks/filesystem:filesystem_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:host_mocks",
"//test/mocks/upstream:host_set_mocks",
"//test/mocks/upstream:load_balancer_mocks",
"//test/mocks/upstream:priority_set_mocks",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
Expand Down Expand Up @@ -472,7 +512,10 @@ envoy_cc_test(
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:server_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/mocks/upstream:cluster_info_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:health_checker_mocks",
"//test/mocks/upstream:priority_set_mocks",
"//test/test_common:registry_lib",
"//test/test_common:utility_lib",
],
Expand Down Expand Up @@ -530,7 +573,6 @@ envoy_cc_test_library(
"//test/mocks/server:instance_mocks",
"//test/mocks/tcp:tcp_mocks",
"//test/mocks/thread_local:thread_local_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/test_common:registry_lib",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
Expand Down Expand Up @@ -568,7 +610,6 @@ envoy_cc_test(
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:upstream_mocks",
"//test/test_common:registry_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand Down
3 changes: 2 additions & 1 deletion test/common/upstream/cds_api_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

#include "test/common/upstream/utility.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/mocks/upstream/cluster_priority_set.h"
#include "test/test_common/printers.h"
#include "test/test_common/utility.h"

Expand Down
7 changes: 7 additions & 0 deletions test/common/upstream/cluster_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#include "envoy/config/core/v3/base.pb.h"

#include "test/common/upstream/test_cluster_manager.h"
#include "test/mocks/upstream/cds_api.h"
#include "test/mocks/upstream/cluster_priority_set.h"
#include "test/mocks/upstream/cluster_real_priority_set.h"
#include "test/mocks/upstream/cluster_update_callbacks.h"
#include "test/mocks/upstream/health_checker.h"
#include "test/mocks/upstream/load_balancer_context.h"
#include "test/mocks/upstream/thread_aware_load_balancer.h"

namespace Envoy {
namespace Upstream {
Expand Down
3 changes: 2 additions & 1 deletion test/common/upstream/cluster_update_tracker_test.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "common/upstream/cluster_update_tracker.h"

#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/mocks/upstream/thread_local_cluster.h"
Comment thread
foreseeable marked this conversation as resolved.

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion test/common/upstream/eds_speed_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/test_common/utility.h"

#include "benchmark/benchmark.h"
Expand Down
3 changes: 2 additions & 1 deletion test/common/upstream/eds_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/mocks/upstream/health_checker.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
4 changes: 3 additions & 1 deletion test/common/upstream/hds_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/server/admin.h"
#include "test/mocks/server/instance.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"
#include "test/mocks/upstream/cluster_info_factory.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/utility.h"

Expand Down
8 changes: 7 additions & 1 deletion test/common/upstream/health_checker_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
#include "test/common/upstream/utility.h"
#include "test/mocks/access_log/mocks.h"
#include "test/mocks/api/mocks.h"
#include "test/mocks/common.h"
#include "test/mocks/http/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/protobuf/mocks.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"
#include "test/mocks/upstream/cluster_priority_set.h"
#include "test/mocks/upstream/health_check_event_logger.h"
#include "test/mocks/upstream/host_set.h"
#include "test/mocks/upstream/transport_socket_match.h"
#include "test/test_common/printers.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/test_runtime.h"
Expand Down
2 changes: 1 addition & 1 deletion test/common/upstream/host_utility_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "common/upstream/upstream_impl.h"

#include "test/common/upstream/utility.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"

#include "gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion test/common/upstream/load_balancer_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "common/upstream/upstream_impl.h"

#include "test/common/upstream/utility.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"

#include "benchmark/benchmark.h"

Expand Down
6 changes: 5 additions & 1 deletion test/common/upstream/load_balancer_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
#include "common/upstream/upstream_impl.h"

#include "test/common/upstream/utility.h"
#include "test/mocks/common.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"
#include "test/mocks/upstream/host_set.h"
#include "test/mocks/upstream/load_balancer_context.h"
#include "test/mocks/upstream/priority_set.h"
#include "test/test_common/logging.h"
#include "test/test_common/test_runtime.h"

Expand Down
4 changes: 3 additions & 1 deletion test/common/upstream/load_balancer_simulation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

#include "test/common/upstream/utility.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_info.h"
#include "test/mocks/upstream/host_set.h"
#include "test/mocks/upstream/priority_set.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"
Expand Down
3 changes: 2 additions & 1 deletion test/common/upstream/load_stats_reporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "test/mocks/event/mocks.h"
#include "test/mocks/grpc/mocks.h"
#include "test/mocks/local_info/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/mocks/upstream/cluster_priority_set.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/utility.h"

Expand Down
2 changes: 1 addition & 1 deletion test/common/upstream/logical_dns_cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "test/mocks/server/instance.h"
#include "test/mocks/ssl/mocks.h"
#include "test/mocks/thread_local/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/upstream/cluster_manager.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down
5 changes: 4 additions & 1 deletion test/common/upstream/maglev_lb_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
#include "common/upstream/maglev_lb.h"

#include "test/common/upstream/utility.h"
#include "test/mocks/upstream/mocks.h"
#include "test/mocks/common.h"
#include "test/mocks/upstream/cluster_info.h"
#include "test/mocks/upstream/host_set.h"
#include "test/mocks/upstream/priority_set.h"

namespace Envoy {
namespace Upstream {
Expand Down
Loading