Home | History | Annotate | Download | only in end2end
      1 # Copyright 2017 gRPC authors.
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #     http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 licenses(["notice"])  # Apache v2
     16 
     17 load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
     18 
     19 grpc_package(
     20     name = "test/cpp/end2end",
     21     visibility = "public",
     22 )  # Allows external users to implement end2end tests.
     23 
     24 grpc_cc_library(
     25     name = "test_service_impl",
     26     testonly = True,
     27     srcs = ["test_service_impl.cc"],
     28     hdrs = ["test_service_impl.h"],
     29     external_deps = [
     30         "gtest",
     31     ],
     32     deps = [
     33         "//src/proto/grpc/testing:echo_proto",
     34         "//test/cpp/util:test_util",
     35     ],
     36 )
     37 
     38 grpc_cc_test(
     39     name = "async_end2end_test",
     40     srcs = ["async_end2end_test.cc"],
     41     external_deps = [
     42         "gtest",
     43     ],
     44     deps = [
     45         "//:gpr",
     46         "//:grpc",
     47         "//:grpc++",
     48         "//src/proto/grpc/health/v1:health_proto",
     49         "//src/proto/grpc/testing:echo_messages_proto",
     50         "//src/proto/grpc/testing:echo_proto",
     51         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
     52         "//test/core/util:gpr_test_util",
     53         "//test/core/util:grpc_test_util",
     54         "//test/cpp/util:test_util",
     55     ],
     56 )
     57 
     58 grpc_cc_test(
     59     name = "client_crash_test",
     60     srcs = ["client_crash_test.cc"],
     61     data = [
     62         ":client_crash_test_server",
     63     ],
     64     external_deps = [
     65         "gtest",
     66     ],
     67     deps = [
     68         "//:gpr",
     69         "//:grpc",
     70         "//:grpc++",
     71         "//src/proto/grpc/testing:echo_messages_proto",
     72         "//src/proto/grpc/testing:echo_proto",
     73         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
     74         "//test/core/util:gpr_test_util",
     75         "//test/core/util:grpc_test_util",
     76         "//test/cpp/util:test_util",
     77     ],
     78 )
     79 
     80 grpc_cc_binary(
     81     name = "client_crash_test_server",
     82     testonly = True,
     83     srcs = ["client_crash_test_server.cc"],
     84     external_deps = [
     85         "gflags",
     86         "gtest",
     87     ],
     88     deps = [
     89         "//:gpr",
     90         "//:grpc",
     91         "//:grpc++",
     92         "//src/proto/grpc/testing:echo_messages_proto",
     93         "//src/proto/grpc/testing:echo_proto",
     94         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
     95         "//test/core/util:gpr_test_util",
     96         "//test/core/util:grpc_test_util",
     97         "//test/cpp/util:test_util",
     98     ],
     99 )
    100 
    101 grpc_cc_test(
    102     name = "client_callback_end2end_test",
    103     srcs = ["client_callback_end2end_test.cc"],
    104     external_deps = [
    105         "gtest",
    106     ],
    107     deps = [
    108         ":test_service_impl",
    109         "//:gpr",
    110         "//:grpc",
    111         "//:grpc++",
    112         "//src/proto/grpc/testing:echo_messages_proto",
    113         "//src/proto/grpc/testing:echo_proto",
    114         "//test/core/util:gpr_test_util",
    115         "//test/core/util:grpc_test_util",
    116         "//test/cpp/util:test_util",
    117     ],
    118 )
    119 
    120 grpc_cc_library(
    121     name = "end2end_test_lib",
    122     testonly = True,
    123     srcs = ["end2end_test.cc"],
    124     external_deps = [
    125         "gtest",
    126     ],
    127     deps = [
    128         ":test_service_impl",
    129         "//:gpr",
    130         "//:grpc",
    131         "//:grpc++",
    132         "//src/proto/grpc/testing:echo_messages_proto",
    133         "//src/proto/grpc/testing:echo_proto",
    134         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    135         "//test/core/util:gpr_test_util",
    136         "//test/core/util:grpc_test_util",
    137         "//test/cpp/util:test_util",
    138     ],
    139 )
    140 
    141 grpc_cc_test(
    142     name = "channelz_service_test",
    143     srcs = ["channelz_service_test.cc"],
    144     external_deps = [
    145         "gtest",
    146     ],
    147     deps = [
    148         ":test_service_impl",
    149         "//:gpr",
    150         "//:grpc",
    151         "//:grpc++",
    152         "//:grpcpp_channelz",
    153         "//src/proto/grpc/channelz:channelz_proto",
    154         "//src/proto/grpc/testing:echo_messages_proto",
    155         "//src/proto/grpc/testing:echo_proto",
    156         "//test/core/util:gpr_test_util",
    157         "//test/core/util:grpc_test_util",
    158         "//test/cpp/util:test_util",
    159     ],
    160 )
    161 
    162 grpc_cc_test(
    163     name = "server_early_return_test",
    164     srcs = ["server_early_return_test.cc"],
    165     external_deps = [
    166         "gtest",
    167     ],
    168     deps = [
    169         "//:gpr",
    170         "//:grpc",
    171         "//:grpc++",
    172         "//src/proto/grpc/testing:echo_messages_proto",
    173         "//src/proto/grpc/testing:echo_proto",
    174         "//test/core/util:gpr_test_util",
    175         "//test/core/util:grpc_test_util",
    176         "//test/cpp/util:test_util",
    177     ],
    178 )
    179 
    180 grpc_cc_test(
    181     name = "end2end_test",
    182     deps = [
    183         ":end2end_test_lib",
    184     ],
    185 )
    186 
    187 grpc_cc_test(
    188     name = "exception_test",
    189     srcs = ["exception_test.cc"],
    190     external_deps = [
    191         "gtest",
    192     ],
    193     deps = [
    194         "//:gpr",
    195         "//:grpc",
    196         "//:grpc++",
    197         "//src/proto/grpc/testing:echo_messages_proto",
    198         "//src/proto/grpc/testing:echo_proto",
    199         "//test/core/util:gpr_test_util",
    200         "//test/core/util:grpc_test_util",
    201         "//test/cpp/util:test_util",
    202     ],
    203 )
    204 
    205 grpc_cc_test(
    206     name = "filter_end2end_test",
    207     srcs = ["filter_end2end_test.cc"],
    208     external_deps = [
    209         "gtest",
    210     ],
    211     deps = [
    212         "//:gpr",
    213         "//:grpc",
    214         "//:grpc++",
    215         "//src/proto/grpc/testing:echo_messages_proto",
    216         "//src/proto/grpc/testing:echo_proto",
    217         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    218         "//test/core/util:gpr_test_util",
    219         "//test/core/util:grpc_test_util",
    220         "//test/cpp/util:test_util",
    221     ],
    222 )
    223 
    224 grpc_cc_test(
    225     name = "generic_end2end_test",
    226     srcs = ["generic_end2end_test.cc"],
    227     external_deps = [
    228         "gtest",
    229     ],
    230     deps = [
    231         "//:gpr",
    232         "//:grpc",
    233         "//:grpc++",
    234         "//src/proto/grpc/testing:echo_messages_proto",
    235         "//src/proto/grpc/testing:echo_proto",
    236         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    237         "//test/core/util:gpr_test_util",
    238         "//test/core/util:grpc_test_util",
    239         "//test/cpp/util:test_util",
    240     ],
    241 )
    242 
    243 grpc_cc_test(
    244     name = "health_service_end2end_test",
    245     srcs = ["health_service_end2end_test.cc"],
    246     external_deps = [
    247         "gtest",
    248     ],
    249     deps = [
    250         ":test_service_impl",
    251         "//:gpr",
    252         "//:grpc",
    253         "//:grpc++",
    254         "//src/proto/grpc/health/v1:health_proto",
    255         "//src/proto/grpc/testing:echo_messages_proto",
    256         "//src/proto/grpc/testing:echo_proto",
    257         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    258         "//test/core/util:gpr_test_util",
    259         "//test/core/util:grpc_test_util",
    260         "//test/cpp/util:test_util",
    261     ],
    262 )
    263 
    264 grpc_cc_test(
    265     name = "hybrid_end2end_test",
    266     srcs = ["hybrid_end2end_test.cc"],
    267     external_deps = [
    268         "gtest",
    269     ],
    270     deps = [
    271         ":test_service_impl",
    272         "//:gpr",
    273         "//:grpc",
    274         "//:grpc++",
    275         "//src/proto/grpc/testing:echo_messages_proto",
    276         "//src/proto/grpc/testing:echo_proto",
    277         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    278         "//test/core/util:gpr_test_util",
    279         "//test/core/util:grpc_test_util",
    280         "//test/cpp/util:test_util",
    281     ],
    282 )
    283 
    284 grpc_cc_test(
    285     name = "raw_end2end_test",
    286     srcs = ["raw_end2end_test.cc"],
    287     external_deps = [
    288         "gtest",
    289     ],
    290     deps = [
    291         ":test_service_impl",
    292         "//:gpr",
    293         "//:grpc",
    294         "//:grpc++",
    295         "//src/proto/grpc/testing:echo_messages_proto",
    296         "//src/proto/grpc/testing:echo_proto",
    297         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    298         "//test/core/util:gpr_test_util",
    299         "//test/core/util:grpc_test_util",
    300         "//test/cpp/util:test_util",
    301     ],
    302 )
    303 
    304 grpc_cc_test(
    305     name = "mock_test",
    306     srcs = ["mock_test.cc"],
    307     external_deps = [
    308         "gmock",
    309         "gtest",
    310     ],
    311     deps = [
    312         "//:gpr",
    313         "//:grpc",
    314         "//:grpc++",
    315         "//:grpc++_test",
    316         "//src/proto/grpc/testing:echo_messages_proto",
    317         "//src/proto/grpc/testing:echo_proto",
    318         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    319         "//test/core/util:gpr_test_util",
    320         "//test/core/util:grpc_test_util",
    321         "//test/cpp/util:test_util",
    322     ],
    323 )
    324 
    325 grpc_cc_test(
    326     name = "nonblocking_test",
    327     srcs = ["nonblocking_test.cc"],
    328     external_deps = [
    329         "gtest",
    330     ],
    331     deps = [
    332         "//:gpr",
    333         "//:grpc",
    334         "//:grpc++",
    335         "//src/proto/grpc/testing:echo_messages_proto",
    336         "//src/proto/grpc/testing:echo_proto",
    337         "//test/core/util:gpr_test_util",
    338         "//test/core/util:grpc_test_util",
    339         "//test/cpp/util:test_util",
    340     ],
    341 )
    342 
    343 grpc_cc_test(
    344     name = "client_lb_end2end_test",
    345     srcs = ["client_lb_end2end_test.cc"],
    346     external_deps = [
    347         "gtest",
    348     ],
    349     deps = [
    350         ":test_service_impl",
    351         "//:gpr",
    352         "//:grpc",
    353         "//:grpc++",
    354         "//src/proto/grpc/testing:echo_messages_proto",
    355         "//src/proto/grpc/testing:echo_proto",
    356         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    357         "//test/core/util:gpr_test_util",
    358         "//test/core/util:grpc_test_util",
    359         "//test/cpp/util:test_util",
    360     ],
    361 )
    362 
    363 grpc_cc_test(
    364     name = "grpclb_end2end_test",
    365     srcs = ["grpclb_end2end_test.cc"],
    366     external_deps = [
    367         "gmock",
    368         "gtest",
    369     ],
    370     deps = [
    371         ":test_service_impl",
    372         "//:gpr",
    373         "//:grpc",
    374         "//:grpc++",
    375         "//:grpc_resolver_fake",
    376         "//src/proto/grpc/lb/v1:load_balancer_proto",
    377         "//src/proto/grpc/testing:echo_messages_proto",
    378         "//src/proto/grpc/testing:echo_proto",
    379         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    380         "//test/core/util:gpr_test_util",
    381         "//test/core/util:grpc_test_util",
    382         "//test/cpp/util:test_util",
    383     ],
    384 )
    385 
    386 grpc_cc_test(
    387     name = "proto_server_reflection_test",
    388     srcs = ["proto_server_reflection_test.cc"],
    389     external_deps = [
    390         "gtest",
    391         "gflags",
    392     ],
    393     deps = [
    394         ":test_service_impl",
    395         "//:gpr",
    396         "//:grpc",
    397         "//:grpc++",
    398         "//:grpc++_reflection",
    399         "//src/proto/grpc/testing:echo_messages_proto",
    400         "//src/proto/grpc/testing:echo_proto",
    401         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    402         "//test/core/util:gpr_test_util",
    403         "//test/core/util:grpc_test_util",
    404         "//test/cpp/util:grpc++_proto_reflection_desc_db",
    405         "//test/cpp/util:test_util",
    406     ],
    407 )
    408 
    409 grpc_cc_test(
    410     name = "server_builder_plugin_test",
    411     srcs = ["server_builder_plugin_test.cc"],
    412     external_deps = [
    413         "gtest",
    414     ],
    415     deps = [
    416         ":test_service_impl",
    417         "//:gpr",
    418         "//:grpc",
    419         "//:grpc++",
    420         "//src/proto/grpc/testing:echo_messages_proto",
    421         "//src/proto/grpc/testing:echo_proto",
    422         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    423         "//test/core/util:gpr_test_util",
    424         "//test/core/util:grpc_test_util",
    425         "//test/cpp/util:test_util",
    426     ],
    427 )
    428 
    429 grpc_cc_test(
    430     name = "server_crash_test",
    431     srcs = ["server_crash_test.cc"],
    432     data = [
    433         ":server_crash_test_client",
    434     ],
    435     external_deps = [
    436         "gtest",
    437     ],
    438     deps = [
    439         "//:gpr",
    440         "//:grpc",
    441         "//:grpc++",
    442         "//src/proto/grpc/testing:echo_messages_proto",
    443         "//src/proto/grpc/testing:echo_proto",
    444         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    445         "//test/core/util:gpr_test_util",
    446         "//test/core/util:grpc_test_util",
    447         "//test/cpp/util:test_util",
    448     ],
    449 )
    450 
    451 grpc_cc_binary(
    452     name = "server_crash_test_client",
    453     testonly = True,
    454     srcs = ["server_crash_test_client.cc"],
    455     external_deps = [
    456         "gflags",
    457         "gtest",
    458     ],
    459     deps = [
    460         "//:gpr",
    461         "//:grpc",
    462         "//:grpc++",
    463         "//src/proto/grpc/testing:echo_messages_proto",
    464         "//src/proto/grpc/testing:echo_proto",
    465         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    466         "//test/core/util:gpr_test_util",
    467         "//test/core/util:grpc_test_util",
    468         "//test/cpp/util:test_util",
    469     ],
    470 )
    471 
    472 grpc_cc_test(
    473     name = "server_load_reporting_end2end_test",
    474     srcs = ["server_load_reporting_end2end_test.cc"],
    475     external_deps = [
    476         "gtest",
    477         "gmock",
    478     ],
    479     deps = [
    480         "//:grpcpp_server_load_reporting",
    481         "//src/proto/grpc/testing:echo_proto",
    482         "//test/cpp/util:test_util",
    483     ],
    484 )
    485 
    486 grpc_cc_test(
    487     name = "shutdown_test",
    488     srcs = ["shutdown_test.cc"],
    489     external_deps = [
    490         "gtest",
    491     ],
    492     deps = [
    493         "//:gpr",
    494         "//:grpc",
    495         "//:grpc++",
    496         "//src/proto/grpc/testing:echo_messages_proto",
    497         "//src/proto/grpc/testing:echo_proto",
    498         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    499         "//test/core/util:gpr_test_util",
    500         "//test/core/util:grpc_test_util",
    501         "//test/cpp/util:test_util",
    502     ],
    503 )
    504 
    505 grpc_cc_test(
    506     name = "streaming_throughput_test",
    507     srcs = ["streaming_throughput_test.cc"],
    508     external_deps = [
    509         "gtest",
    510     ],
    511     deps = [
    512         "//:gpr",
    513         "//:grpc",
    514         "//:grpc++",
    515         "//src/proto/grpc/testing:echo_messages_proto",
    516         "//src/proto/grpc/testing:echo_proto",
    517         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    518         "//test/core/util:gpr_test_util",
    519         "//test/core/util:grpc_test_util",
    520         "//test/cpp/util:test_util",
    521     ],
    522 )
    523 
    524 grpc_cc_test(
    525     name = "thread_stress_test",
    526     srcs = ["thread_stress_test.cc"],
    527     external_deps = [
    528         "gtest",
    529     ],
    530     deps = [
    531         "//:gpr",
    532         "//:grpc",
    533         "//:grpc++",
    534         "//src/proto/grpc/testing:echo_messages_proto",
    535         "//src/proto/grpc/testing:echo_proto",
    536         "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
    537         "//test/core/util:gpr_test_util",
    538         "//test/core/util:grpc_test_util",
    539         "//test/cpp/util:test_util",
    540     ],
    541 )
    542