diff options
author | 2017-11-06 14:39:17 -0800 | |
---|---|---|
committer | 2017-11-06 14:43:31 -0800 | |
commit | 40422d5fa621624868280094efb2f01c2cd1352b (patch) | |
tree | cbb2baa955e11c03fa004e9e0f4f3037ba3d6150 /test/core/end2end/fixtures/h2_proxy.cc | |
parent | aae4ca01a315a69fcf182d09aea1efdfcda13d48 (diff) | |
parent | e759d2ad7abdb0702970eeccc5f033ff4b2a4c7f (diff) |
Merge master
Diffstat (limited to 'test/core/end2end/fixtures/h2_proxy.cc')
-rw-r--r-- | test/core/end2end/fixtures/h2_proxy.cc | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/test/core/end2end/fixtures/h2_proxy.cc b/test/core/end2end/fixtures/h2_proxy.cc index e1eb9687d0..03ffa02e17 100644 --- a/test/core/end2end/fixtures/h2_proxy.cc +++ b/test/core/end2end/fixtures/h2_proxy.cc @@ -37,18 +37,18 @@ #include "test/core/util/test_config.h" typedef struct fullstack_fixture_data { - grpc_end2end_proxy *proxy; + grpc_end2end_proxy* proxy; } fullstack_fixture_data; -static grpc_server *create_proxy_server(const char *port, - grpc_channel_args *server_args) { - grpc_server *s = grpc_server_create(server_args, NULL); +static grpc_server* create_proxy_server(const char* port, + grpc_channel_args* server_args) { + grpc_server* s = grpc_server_create(server_args, NULL); GPR_ASSERT(grpc_server_add_insecure_http2_port(s, port)); return s; } -static grpc_channel *create_proxy_client(const char *target, - grpc_channel_args *client_args) { +static grpc_channel* create_proxy_client(const char* target, + grpc_channel_args* client_args) { return grpc_insecure_channel_create(target, client_args, NULL); } @@ -56,9 +56,9 @@ static const grpc_end2end_proxy_def proxy_def = {create_proxy_server, create_proxy_client}; static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( - grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_channel_args* client_args, grpc_channel_args* server_args) { grpc_end2end_test_fixture f; - fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>( + fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>( gpr_malloc(sizeof(fullstack_fixture_data))); memset(&f, 0, sizeof(f)); @@ -71,19 +71,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( return f; } -void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { - fullstack_fixture_data *ffd = - static_cast<fullstack_fixture_data *>(f->fixture_data); +void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, + grpc_channel_args* client_args) { + fullstack_fixture_data* ffd = + static_cast<fullstack_fixture_data*>(f->fixture_data); f->client = grpc_insecure_channel_create( grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL); GPR_ASSERT(f->client); } -void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *server_args) { - fullstack_fixture_data *ffd = - static_cast<fullstack_fixture_data *>(f->fixture_data); +void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f, + grpc_channel_args* server_args) { + fullstack_fixture_data* ffd = + static_cast<fullstack_fixture_data*>(f->fixture_data); if (f->server) { grpc_server_destroy(f->server); } @@ -94,24 +94,25 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, grpc_server_start(f->server); } -void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { - fullstack_fixture_data *ffd = - static_cast<fullstack_fixture_data *>(f->fixture_data); +void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) { + fullstack_fixture_data* ffd = + static_cast<fullstack_fixture_data*>(f->fixture_data); grpc_end2end_proxy_destroy(ffd->proxy); gpr_free(ffd); } /* 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_CLIENT_CHANNEL | - FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, + {"chttp2/fullstack+proxy", + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + 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}, }; -int main(int argc, char **argv) { +int main(int argc, char** argv) { size_t i; grpc_test_init(argc, argv); |