xds_end2end_test: move test framework to its own library (#29279)

* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move AdminServerThread to CSDS test suite

* remove unnecessary deps
pull/29386/head
Mark D. Roth 3 years ago committed by GitHub
parent 94c538cd55
commit 3a4058c07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CMakeLists.txt
  2. 2
      build_autogenerated.yaml
  3. 40
      test/cpp/end2end/xds/BUILD
  4. 2287
      test/cpp/end2end/xds/xds_end2end_test.cc
  5. 1002
      test/cpp/end2end/xds/xds_end2end_test_lib.cc
  6. 1065
      test/cpp/end2end/xds/xds_end2end_test_lib.h

1
CMakeLists.txt generated

@ -17221,6 +17221,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
test/cpp/end2end/rls_server.cc
test/cpp/end2end/test_service_impl.cc
test/cpp/end2end/xds/xds_end2end_test.cc
test/cpp/end2end/xds/xds_end2end_test_lib.cc
test/cpp/end2end/xds/xds_server.cc
test/cpp/util/tls_test_utils.cc
third_party/googletest/googletest/src/gtest-all.cc

@ -8411,6 +8411,7 @@ targets:
- test/cpp/end2end/counted_service.h
- test/cpp/end2end/rls_server.h
- test/cpp/end2end/test_service_impl.h
- test/cpp/end2end/xds/xds_end2end_test_lib.h
- test/cpp/end2end/xds/xds_server.h
- test/cpp/util/tls_test_utils.h
src:
@ -8459,6 +8460,7 @@ targets:
- test/cpp/end2end/rls_server.cc
- test/cpp/end2end/test_service_impl.cc
- test/cpp/end2end/xds/xds_end2end_test.cc
- test/cpp/end2end/xds/xds_end2end_test_lib.cc
- test/cpp/end2end/xds/xds_server.cc
- test/cpp/util/tls_test_utils.cc
deps:

@ -47,6 +47,42 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "xds_end2end_test_lib",
testonly = True,
srcs = ["xds_end2end_test_lib.cc"],
hdrs = ["xds_end2end_test_lib.h"],
external_deps = [
"gtest",
],
deps = [
":xds_server",
"//:gpr",
"//:grpc",
"//:grpc++",
"//:grpc_resolver_fake",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
"//src/proto/grpc/testing/xds:ads_for_test_proto",
"//src/proto/grpc/testing/xds:lrs_for_test_proto",
"//src/proto/grpc/testing/xds/v3:ads_proto",
"//src/proto/grpc/testing/xds/v3:cluster_proto",
"//src/proto/grpc/testing/xds/v3:discovery_proto",
"//src/proto/grpc/testing/xds/v3:endpoint_proto",
"//src/proto/grpc/testing/xds/v3:http_connection_manager_proto",
"//src/proto/grpc/testing/xds/v3:http_filter_rbac_proto",
"//src/proto/grpc/testing/xds/v3:listener_proto",
"//src/proto/grpc/testing/xds/v3:lrs_proto",
"//src/proto/grpc/testing/xds/v3:route_proto",
"//src/proto/grpc/testing/xds/v3:router_proto",
"//test/core/util:grpc_test_util",
"//test/cpp/end2end:counted_service",
"//test/cpp/end2end:test_service_impl",
"//test/cpp/util:tls_test_utils",
],
)
grpc_cc_test(
name = "xds_end2end_test",
size = "large",
@ -71,7 +107,7 @@ grpc_cc_test(
"no_windows",
], # TODO(jtattermusch): fix test on windows
deps = [
":xds_server",
":xds_end2end_test_lib",
"//:gpr",
"//:grpc",
"//:grpc++",
@ -97,9 +133,7 @@ grpc_cc_test(
"//src/proto/grpc/testing/xds/v3:router_proto",
"//src/proto/grpc/testing/xds/v3:tls_proto",
"//test/core/util:grpc_test_util",
"//test/cpp/end2end:counted_service",
"//test/cpp/end2end:rls_server",
"//test/cpp/end2end:test_service_impl",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
"//test/cpp/util:tls_test_utils",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save