diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-08 07:20:27 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-08 07:20:27 -0800 |
commit | b720b609eaa7ad6ca009e55bf773ec32e9c68f6a (patch) | |
tree | 555719efdc4bbe6b41a573b02a565c917e6e4e27 /test/core/end2end/fixtures | |
parent | 32df467f1189c2b1bc7010b0a99932a7a3fb2684 (diff) | |
parent | 150fbe1e5f1b2a88c35b39480770eb1503692bed (diff) |
Merge github.com:grpc/grpc into grpc_slice
Diffstat (limited to 'test/core/end2end/fixtures')
-rw-r--r-- | test/core/end2end/fixtures/h2_census.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_compress.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_fake_resolver.c | 128 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_fakesec.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_fd.c | 11 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_full+pipe.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_full+trace.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_full.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_http_proxy.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_load_reporting.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_oauth2.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_proxy.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_sockpair+trace.c | 10 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_sockpair.c | 10 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_sockpair_1byte.c | 11 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_ssl.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_ssl_cert.c | 73 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_ssl_proxy.c | 8 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_uds.c | 8 |
19 files changed, 105 insertions, 242 deletions
diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c index c2e1acf57f..c52d7660f5 100644 --- a/test/core/end2end/fixtures/h2_census.c +++ b/test/core/end2end/fixtures/h2_census.c @@ -79,9 +79,7 @@ static grpc_arg make_census_enable_arg(void) { } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; grpc_arg arg = make_census_enable_arg(); client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1); @@ -113,7 +111,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_compress.c b/test/core/end2end/fixtures/h2_compress.c index 94a198f380..fedd2ebc46 100644 --- a/test/core/end2end/fixtures/h2_compress.c +++ b/test/core/end2end/fixtures/h2_compress.c @@ -75,9 +75,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression( } void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_compression_fixture_data *ffd = f->fixture_data; if (ffd->client_args_compression != NULL) { grpc_channel_args_destroy(ffd->client_args_compression); @@ -115,7 +113,9 @@ void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack_compression, chttp2_init_client_fullstack_compression, chttp2_init_server_fullstack_compression, diff --git a/test/core/end2end/fixtures/h2_fake_resolver.c b/test/core/end2end/fixtures/h2_fake_resolver.c deleted file mode 100644 index 429f3c95f9..0000000000 --- a/test/core/end2end/fixtures/h2_fake_resolver.c +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright 2016, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#include "test/core/end2end/end2end_tests.h" - -#include <string.h> - -#include <grpc/support/alloc.h> -#include <grpc/support/host_port.h> -#include <grpc/support/log.h> -#include <grpc/support/string_util.h> -#include <grpc/support/sync.h> -#include <grpc/support/thd.h> -#include <grpc/support/useful.h> - -#include "src/core/ext/client_channel/client_channel.h" -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/lib/channel/connected_channel.h" -#include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/surface/server.h" -#include "test/core/end2end/fake_resolver.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -typedef struct fullstack_fixture_data { - char *localaddr; -} fullstack_fixture_data; - -static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( - grpc_channel_args *client_args, grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - int port = grpc_pick_unused_port_or_die(); - fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); - memset(&f, 0, sizeof(f)); - - gpr_join_host_port(&ffd->localaddr, "127.0.0.1", port); - - f.fixture_data = ffd; - f.cq = grpc_completion_queue_create(NULL); - - return f; -} - -void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - fullstack_fixture_data *ffd = f->fixture_data; - char *server_uri; - gpr_asprintf(&server_uri, "test:%s%s%s", ffd->localaddr, - (query_args == NULL ? "" : "?"), - (query_args == NULL ? "" : query_args)); - gpr_log(GPR_INFO, "server_uri: %s", server_uri); - f->client = grpc_insecure_channel_create(server_uri, client_args, NULL); - GPR_ASSERT(f->client); - gpr_free(server_uri); -} - -void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *server_args) { - fullstack_fixture_data *ffd = f->fixture_data; - if (f->server) { - grpc_server_destroy(f->server); - } - f->server = grpc_server_create(server_args, NULL); - grpc_server_register_completion_queue(f->server, f->cq, NULL); - GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); - grpc_server_start(f->server); -} - -void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { - fullstack_fixture_data *ffd = f->fixture_data; - gpr_free(ffd->localaddr); - gpr_free(ffd); -} - -/* All test configurations */ -static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_QUERY_ARGS, - chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, - chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, -}; - -int main(int argc, char **argv) { - size_t i; - - grpc_test_init(argc, argv); - grpc_end2end_tests_pre_init(); - grpc_fake_resolver_init(); - grpc_init(); - - for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { - grpc_end2end_tests(argc, argv, configs[i]); - } - - grpc_shutdown(); - - return 0; -} diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c index dbe9011dcf..c9747913c2 100644 --- a/test/core/end2end/fixtures/h2_fakesec.c +++ b/test/core/end2end/fixtures/h2_fakesec.c @@ -105,9 +105,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_fake_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { grpc_channel_credentials *fake_ts_creds = grpc_fake_transport_security_credentials_create(); chttp2_init_client_secure_fullstack(f, client_args, fake_ts_creds); @@ -142,7 +140,9 @@ static void chttp2_init_server_fake_secure_fullstack( static grpc_end2end_test_config configs[] = { {"chttp2/fake_secure_fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_secure_fullstack, chttp2_init_client_fake_secure_fullstack, chttp2_init_server_fake_secure_fullstack, diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 2dfa54fb6b..223fadc386 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -78,10 +78,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); - + grpc_channel_args *client_args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; sp_fixture_data *sfd = f->fixture_data; @@ -114,9 +111,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fd", 0, chttp2_create_fixture_socketpair, - chttp2_init_client_socketpair, chttp2_init_server_socketpair, - chttp2_tear_down_socketpair}, + {"chttp2/fd", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, + chttp2_create_fixture_socketpair, chttp2_init_client_socketpair, + chttp2_init_server_socketpair, chttp2_tear_down_socketpair}, }; int main(int argc, char **argv) { diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index e0026a7940..c6013f3040 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); @@ -104,7 +102,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index eadc62d963..11a102a576 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); @@ -104,7 +102,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_full.c b/test/core/end2end/fixtures/h2_full.c index 182ce23a51..3399f1981e 100644 --- a/test/core/end2end/fixtures/h2_full.c +++ b/test/core/end2end/fixtures/h2_full.c @@ -70,9 +70,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); @@ -98,7 +96,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_http_proxy.c b/test/core/end2end/fixtures/h2_http_proxy.c index 2acc06f549..44b223664a 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.c +++ b/test/core/end2end/fixtures/h2_http_proxy.c @@ -75,9 +75,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; char *proxy_uri; gpr_asprintf(&proxy_uri, "http://%s", @@ -109,7 +107,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_load_reporting.c b/test/core/end2end/fixtures/h2_load_reporting.c index 0957666a44..7a76489b44 100644 --- a/test/core/end2end/fixtures/h2_load_reporting.c +++ b/test/core/end2end/fixtures/h2_load_reporting.c @@ -73,9 +73,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting( } void chttp2_init_client_load_reporting(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { load_reporting_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); @@ -105,7 +103,9 @@ void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { {"chttp2/fullstack+load_reporting", - FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_load_reporting, chttp2_init_client_load_reporting, chttp2_init_server_load_reporting, chttp2_tear_down_load_reporting}, }; diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index dd636cfff6..6122f4f2f9 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -150,9 +150,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(test_root_cert, NULL, NULL); grpc_call_credentials *oauth2_creds = @@ -218,7 +216,9 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( static grpc_end2end_test_config configs[] = { {"chttp2/simple_ssl_with_oauth2_fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_secure_fullstack, chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c index 2671e0abde..9e37ed4db3 100644 --- a/test/core/end2end/fixtures/h2_proxy.c +++ b/test/core/end2end/fixtures/h2_proxy.c @@ -85,9 +85,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create( grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL); @@ -116,7 +114,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { {"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_REQUEST_PROXYING, + FEATURE_MASK_SUPPORTS_REQUEST_PROXYING | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index a358edf321..726ed8735c 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -104,9 +104,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; @@ -143,9 +141,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair, - chttp2_init_client_socketpair, chttp2_init_server_socketpair, - chttp2_tear_down_socketpair}, + {"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, + chttp2_create_fixture_socketpair, chttp2_init_client_socketpair, + chttp2_init_server_socketpair, chttp2_tear_down_socketpair}, }; int main(int argc, char **argv) { diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index 8f7083af59..94b2623b3e 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -98,9 +98,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; @@ -137,9 +135,9 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair, - chttp2_init_client_socketpair, chttp2_init_server_socketpair, - chttp2_tear_down_socketpair}, + {"chttp2/socketpair", FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, + chttp2_create_fixture_socketpair, chttp2_init_client_socketpair, + chttp2_init_server_socketpair, chttp2_tear_down_socketpair}, }; int main(int argc, char **argv) { diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index b3d9924c12..0a45f76395 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -98,9 +98,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; @@ -137,9 +135,10 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/socketpair_one_byte_at_a_time", 0, - chttp2_create_fixture_socketpair, chttp2_init_client_socketpair, - chttp2_init_server_socketpair, chttp2_tear_down_socketpair}, + {"chttp2/socketpair_one_byte_at_a_time", + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_socketpair, + chttp2_init_client_socketpair, chttp2_init_server_socketpair, + chttp2_tear_down_socketpair}, }; int main(int argc, char **argv) { diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c index 63282ae081..bbd522cf30 100644 --- a/test/core/end2end/fixtures/h2_ssl.c +++ b/test/core/end2end/fixtures/h2_ssl.c @@ -109,9 +109,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, @@ -153,7 +151,9 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( static grpc_end2end_test_config configs[] = { {"chttp2/simple_ssl_fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_secure_fullstack, chttp2_init_client_simple_ssl_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index 4c2f5f535e..e39cb491de 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -154,41 +154,39 @@ SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY) typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; -#define CLIENT_INIT(cert_type) \ - static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ - grpc_channel_args * client_args, \ - const char *query_args) { \ - GPR_ASSERT(query_args == NULL); \ - grpc_channel_credentials *ssl_creds = NULL; \ - grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ - test_self_signed_client_key, test_self_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \ - test_signed_client_key, test_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \ - test_self_signed_client_key, test_signed_client_cert}; \ - grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \ - switch (cert_type) { \ - case SELF_SIGNED: \ - key_cert_pair = &self_signed_client_key_cert_pair; \ - break; \ - case SIGNED: \ - key_cert_pair = &signed_client_key_cert_pair; \ - break; \ - case BAD_CERT_PAIR: \ - key_cert_pair = &bad_client_key_cert_pair; \ - break; \ - default: \ - break; \ - } \ - ssl_creds = \ - grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \ - grpc_arg ssl_name_override = {GRPC_ARG_STRING, \ - GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \ - {"foo.test.google.fr"}}; \ - grpc_channel_args *new_client_args = \ - grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ - chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ - grpc_channel_args_destroy(new_client_args); \ +#define CLIENT_INIT(cert_type) \ + static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ + grpc_channel_args * client_args) { \ + grpc_channel_credentials *ssl_creds = NULL; \ + grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ + test_self_signed_client_key, test_self_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \ + test_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \ + test_self_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \ + switch (cert_type) { \ + case SELF_SIGNED: \ + key_cert_pair = &self_signed_client_key_cert_pair; \ + break; \ + case SIGNED: \ + key_cert_pair = &signed_client_key_cert_pair; \ + break; \ + case BAD_CERT_PAIR: \ + key_cert_pair = &bad_client_key_cert_pair; \ + break; \ + default: \ + break; \ + } \ + ssl_creds = \ + grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \ + grpc_arg ssl_name_override = {GRPC_ARG_STRING, \ + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \ + {"foo.test.google.fr"}}; \ + grpc_channel_args *new_client_args = \ + grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ + chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ + grpc_channel_args_destroy(new_client_args); \ } CLIENT_INIT(NONE) @@ -205,7 +203,8 @@ typedef enum { SUCCESS, FAIL } test_result; { \ {TEST_NAME(request_type, cert_type, result), \ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | \ - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, \ + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | \ + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL, \ chttp2_create_fixture_secure_fullstack, CLIENT_INIT_NAME(cert_type), \ SERVER_INIT_NAME(request_type), chttp2_tear_down_secure_fullstack}, \ result \ @@ -267,7 +266,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args, NULL); + config.init_client(&f, client_args); return f; } diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 7d39fb2055..27cf3ebf32 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -142,9 +142,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, @@ -187,7 +185,9 @@ static grpc_end2end_test_config configs[] = { {"chttp2/simple_ssl_fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | FEATURE_MASK_SUPPORTS_REQUEST_PROXYING | - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_secure_fullstack, chttp2_init_client_simple_ssl_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, diff --git a/test/core/end2end/fixtures/h2_uds.c b/test/core/end2end/fixtures/h2_uds.c index 888d6c0a10..bc973ea8e3 100644 --- a/test/core/end2end/fixtures/h2_uds.c +++ b/test/core/end2end/fixtures/h2_uds.c @@ -76,9 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - const char *query_args) { - GPR_ASSERT(query_args == NULL); + grpc_channel_args *client_args) { fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); } @@ -103,7 +101,9 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; |