diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-07-20 16:48:01 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-07-20 16:48:01 -0700 |
commit | c62ce80b805837dc2246b453a4a8b76c886cb6a3 (patch) | |
tree | 37b03c8af1c3fffc103643713ed577edb92dbe5f | |
parent | a74ea8602d60bfdf4d99642e6c72573b803e69dc (diff) |
Test credentials are passed with channel arg. Renamed macros and refactored code as per suggestions. Renamed test to proxy_auth and changed it to use simple_request instead of a payload.
17 files changed, 169 insertions, 1028 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d6cf021d4..266f2c0774 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4352,9 +4352,9 @@ add_library(end2end_tests test/core/end2end/tests/no_logging.c test/core/end2end/tests/no_op.c test/core/end2end/tests/payload.c - test/core/end2end/tests/payload_with_proxy_auth.c test/core/end2end/tests/ping.c test/core/end2end/tests/ping_pong_streaming.c + test/core/end2end/tests/proxy_auth.c test/core/end2end/tests/registered_call.c test/core/end2end/tests/request_with_flags.c test/core/end2end/tests/request_with_payload.c @@ -4452,9 +4452,9 @@ add_library(end2end_nosec_tests test/core/end2end/tests/no_logging.c test/core/end2end/tests/no_op.c test/core/end2end/tests/payload.c - test/core/end2end/tests/payload_with_proxy_auth.c test/core/end2end/tests/ping.c test/core/end2end/tests/ping_pong_streaming.c + test/core/end2end/tests/proxy_auth.c test/core/end2end/tests/registered_call.c test/core/end2end/tests/request_with_flags.c test/core/end2end/tests/request_with_payload.c @@ -7950,9 +7950,9 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/no_logging.c \ test/core/end2end/tests/no_op.c \ test/core/end2end/tests/payload.c \ - test/core/end2end/tests/payload_with_proxy_auth.c \ test/core/end2end/tests/ping.c \ test/core/end2end/tests/ping_pong_streaming.c \ + test/core/end2end/tests/proxy_auth.c \ test/core/end2end/tests/registered_call.c \ test/core/end2end/tests/request_with_flags.c \ test/core/end2end/tests/request_with_payload.c \ @@ -8045,9 +8045,9 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/no_logging.c \ test/core/end2end/tests/no_op.c \ test/core/end2end/tests/payload.c \ - test/core/end2end/tests/payload_with_proxy_auth.c \ test/core/end2end/tests/ping.c \ test/core/end2end/tests/ping_pong_streaming.c \ + test/core/end2end/tests/proxy_auth.c \ test/core/end2end/tests/registered_call.c \ test/core/end2end/tests/request_with_flags.c \ test/core/end2end/tests/request_with_payload.c \ diff --git a/src/core/ext/filters/client_channel/http_proxy.c b/src/core/ext/filters/client_channel/http_proxy.c index 2e2471e68d..8a14b4e57c 100644 --- a/src/core/ext/filters/client_channel/http_proxy.c +++ b/src/core/ext/filters/client_channel/http_proxy.c @@ -30,21 +30,19 @@ #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include "src/core/ext/filters/client_channel/uri_parser.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/slice/b64.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/slice/b64.h" /** * Parses the 'http_proxy' env var and returns the proxy hostname to resolve or - * NULL on error. Also sets 'user_cred' to user credentials present in the - * 'http_proxy' env var, NULL if not present. + * NULL on error. Also sets 'user_cred' to user credentials if present in the + * 'http_proxy' env var, otherwise leaves it unchanged. It is caller's + * responsibility to gpr_free user_cred. */ -static char *grpc_get_http_proxy_server(grpc_exec_ctx* exec_ctx, - char **user_cred) { - char *proxy_name = NULL; - if(user_cred != NULL) { - *user_cred = NULL; - } +static char* get_http_proxy_server(grpc_exec_ctx* exec_ctx, char** user_cred) { + GPR_ASSERT(user_cred != NULL); + char* proxy_name = NULL; char* uri_str = gpr_getenv("http_proxy"); if (uri_str == NULL) return NULL; grpc_uri* uri = @@ -58,27 +56,25 @@ static char *grpc_get_http_proxy_server(grpc_exec_ctx* exec_ctx, goto done; } /* Split on '@' to separate user credentials from host */ - char **authority_strs = NULL; + char** authority_strs = NULL; size_t authority_nstrs; gpr_string_split(uri->authority, "@", &authority_strs, &authority_nstrs); GPR_ASSERT(authority_nstrs != 0); /* should have at least 1 string */ - if(authority_nstrs == 1) { - /* User cred not present in authority */ - proxy_name = gpr_strdup(authority_strs[0]); - } else if(authority_nstrs == 2) { - /* User cred found */ - if(user_cred != NULL) { - *user_cred = gpr_strdup(authority_strs[0]); - } - proxy_name = gpr_strdup(authority_strs[1]); + if (authority_nstrs == 1) { + /* User cred not present in authority */ + proxy_name = authority_strs[0]; + } else if (authority_nstrs == 2) { + /* User cred found */ + *user_cred = authority_strs[0]; + proxy_name = authority_strs[1]; gpr_log(GPR_INFO, "userinfo found in proxy URI"); } else { - /* Bad authority */ + /* Bad authority */ + for (size_t i = 0; i < authority_nstrs; i++) { + gpr_free(authority_strs[i]); + } proxy_name = NULL; } - for(size_t i = 0; i < authority_nstrs; i++) { - gpr_free(authority_strs[i]); - } gpr_free(authority_strs); done: gpr_free(uri_str); @@ -92,8 +88,8 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx, const grpc_channel_args* args, char** name_to_resolve, grpc_channel_args** new_args) { - char *user_cred = NULL; - *name_to_resolve = grpc_get_http_proxy_server(exec_ctx, &user_cred); + char* user_cred = NULL; + *name_to_resolve = get_http_proxy_server(exec_ctx, &user_cred); if (*name_to_resolve == NULL) return false; grpc_uri* uri = grpc_uri_parse(exec_ctx, server_uri, false /* suppress_errors */); @@ -163,15 +159,15 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx, args_to_add[0] = grpc_channel_arg_string_create( GRPC_ARG_HTTP_CONNECT_SERVER, uri->path[0] == '/' ? uri->path + 1 : uri->path); - if(user_cred != NULL) { - /* Use base64 encoding for user credentials */ - char *encoded_user_cred = + if (user_cred != NULL) { + /* Use base64 encoding for user credentials as stated in RFC 7617 */ + char* encoded_user_cred = grpc_base64_encode(user_cred, strlen(user_cred), 0, 0); - char *header; + char* header; gpr_asprintf(&header, "Proxy-Authorization:Basic %s", encoded_user_cred); gpr_free(encoded_user_cred); - args_to_add[1] = grpc_channel_arg_string_create( - GRPC_ARG_HTTP_CONNECT_HEADERS, header); + args_to_add[1] = + grpc_channel_arg_string_create(GRPC_ARG_HTTP_CONNECT_HEADERS, header); *new_args = grpc_channel_args_copy_and_add(args, args_to_add, 2); gpr_free(header); } else { diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 483f84e783..6a061a4e2d 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -102,12 +102,12 @@ extern void no_op(grpc_end2end_test_config config); extern void no_op_pre_init(void); extern void payload(grpc_end2end_test_config config); extern void payload_pre_init(void); -extern void payload_with_proxy_auth(grpc_end2end_test_config config); -extern void payload_with_proxy_auth_pre_init(void); extern void ping(grpc_end2end_test_config config); extern void ping_pre_init(void); extern void ping_pong_streaming(grpc_end2end_test_config config); extern void ping_pong_streaming_pre_init(void); +extern void proxy_auth(grpc_end2end_test_config config); +extern void proxy_auth_pre_init(void); extern void registered_call(grpc_end2end_test_config config); extern void registered_call_pre_init(void); extern void request_with_flags(grpc_end2end_test_config config); @@ -181,9 +181,9 @@ void grpc_end2end_tests_pre_init(void) { no_logging_pre_init(); no_op_pre_init(); payload_pre_init(); - payload_with_proxy_auth_pre_init(); ping_pre_init(); ping_pong_streaming_pre_init(); + proxy_auth_pre_init(); registered_call_pre_init(); request_with_flags_pre_init(); request_with_payload_pre_init(); @@ -245,9 +245,9 @@ void grpc_end2end_tests(int argc, char **argv, no_logging(config); no_op(config); payload(config); - payload_with_proxy_auth(config); ping(config); ping_pong_streaming(config); + proxy_auth(config); registered_call(config); request_with_flags(config); request_with_payload(config); @@ -412,10 +412,6 @@ void grpc_end2end_tests(int argc, char **argv, payload(config); continue; } - if (0 == strcmp("payload_with_proxy_auth", argv[i])) { - payload_with_proxy_auth(config); - continue; - } if (0 == strcmp("ping", argv[i])) { ping(config); continue; @@ -424,6 +420,10 @@ void grpc_end2end_tests(int argc, char **argv, ping_pong_streaming(config); continue; } + if (0 == strcmp("proxy_auth", argv[i])) { + proxy_auth(config); + continue; + } if (0 == strcmp("registered_call", argv[i])) { registered_call(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 745546dbb7..3fc7c3fb6c 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -104,12 +104,12 @@ extern void no_op(grpc_end2end_test_config config); extern void no_op_pre_init(void); extern void payload(grpc_end2end_test_config config); extern void payload_pre_init(void); -extern void payload_with_proxy_auth(grpc_end2end_test_config config); -extern void payload_with_proxy_auth_pre_init(void); extern void ping(grpc_end2end_test_config config); extern void ping_pre_init(void); extern void ping_pong_streaming(grpc_end2end_test_config config); extern void ping_pong_streaming_pre_init(void); +extern void proxy_auth(grpc_end2end_test_config config); +extern void proxy_auth_pre_init(void); extern void registered_call(grpc_end2end_test_config config); extern void registered_call_pre_init(void); extern void request_with_flags(grpc_end2end_test_config config); @@ -184,9 +184,9 @@ void grpc_end2end_tests_pre_init(void) { no_logging_pre_init(); no_op_pre_init(); payload_pre_init(); - payload_with_proxy_auth_pre_init(); ping_pre_init(); ping_pong_streaming_pre_init(); + proxy_auth_pre_init(); registered_call_pre_init(); request_with_flags_pre_init(); request_with_payload_pre_init(); @@ -249,9 +249,9 @@ void grpc_end2end_tests(int argc, char **argv, no_logging(config); no_op(config); payload(config); - payload_with_proxy_auth(config); ping(config); ping_pong_streaming(config); + proxy_auth(config); registered_call(config); request_with_flags(config); request_with_payload(config); @@ -420,10 +420,6 @@ void grpc_end2end_tests(int argc, char **argv, payload(config); continue; } - if (0 == strcmp("payload_with_proxy_auth", argv[i])) { - payload_with_proxy_auth(config); - continue; - } if (0 == strcmp("ping", argv[i])) { ping(config); continue; @@ -432,6 +428,10 @@ void grpc_end2end_tests(int argc, char **argv, ping_pong_streaming(config); continue; } + if (0 == strcmp("proxy_auth", argv[i])) { + proxy_auth(config); + continue; + } if (0 == strcmp("registered_call", argv[i])) { registered_call(config); continue; diff --git a/test/core/end2end/fixtures/h2_http_proxy.c b/test/core/end2end/fixtures/h2_http_proxy.c index ce93c614df..fdc8d749c6 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.c +++ b/test/core/end2end/fixtures/h2_http_proxy.c @@ -47,24 +47,13 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( grpc_channel_args *client_args, grpc_channel_args *server_args) { grpc_end2end_test_fixture f; memset(&f, 0, sizeof(f)); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); const int server_port = grpc_pick_unused_port_or_die(); gpr_join_host_port(&ffd->server_addr, "localhost", server_port); - /* If we are testing proxy auth, add the proxy auth arg to proxy channel args + /* Passing client_args to proxy_create for the case of checking for proxy auth */ - grpc_channel_args *proxy_args = NULL; - const grpc_arg *proxy_auth_arg = grpc_channel_args_find( - client_args, GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT); - if(proxy_auth_arg != NULL) { - proxy_args = grpc_channel_args_copy_and_add(NULL, proxy_auth_arg, 1); - } - ffd->proxy = grpc_end2end_http_proxy_create(proxy_args); - grpc_channel_args_destroy(&exec_ctx, proxy_args); - - grpc_exec_ctx_finish(&exec_ctx); + ffd->proxy = grpc_end2end_http_proxy_create(client_args); f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(NULL); @@ -79,13 +68,13 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, char *proxy_uri; /* If testing for proxy auth, add credentials to proxy uri */ - if(grpc_channel_args_find( - client_args, GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT) == NULL) { + const grpc_arg *proxy_auth = + grpc_channel_args_find(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + if (proxy_auth == NULL) { gpr_asprintf(&proxy_uri, "http://%s", grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } else { - gpr_asprintf(&proxy_uri, "http://%s@%s", - GRPC_END2END_HTTP_PROXY_TEST_CONNECT_CRED, + gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth->value.string, grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } gpr_setenv("http_proxy", proxy_uri); diff --git a/test/core/end2end/fixtures/http_proxy_fixture.c b/test/core/end2end/fixtures/http_proxy_fixture.c index 239444e75f..266351d181 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.c +++ b/test/core/end2end/fixtures/http_proxy_fixture.c @@ -309,41 +309,23 @@ static void on_server_connect_done(grpc_exec_ctx* exec_ctx, void* arg, /** * Parses the proxy auth header value to check if it matches :- - * Basic <base64_encoded_user_cred> + * Basic <base64_encoded_expected_cred> * Returns true if it matches, false otherwise */ -static bool proxy_auth_header_matches(grpc_exec_ctx *exec_ctx, - char *proxy_auth_header_val) { - if(proxy_auth_header_val == NULL) { +static bool proxy_auth_header_matches(grpc_exec_ctx* exec_ctx, + char* proxy_auth_header_val, + char* expected_cred) { + GPR_ASSERT(proxy_auth_header_val != NULL && expected_cred != NULL); + if (strncmp(proxy_auth_header_val, "Basic ", 6) != 0) { return false; } - char **auth_header_strs; - size_t auth_header_nstrs; - bool auth_header_matches = false; - // Split the auth header value on space - gpr_string_split(proxy_auth_header_val, " ", &auth_header_strs, - &auth_header_nstrs); - if(auth_header_nstrs != 2) { - goto done; - } - // Authentication type should be Basic - if(strcmp(auth_header_strs[0], "Basic") != 0) { - goto done; - } - // should match GRPC_END2END_HTTP_PROXY_TEST_CONNECT_CRED after decoding + proxy_auth_header_val += 6; grpc_slice decoded_slice = - grpc_base64_decode(exec_ctx, auth_header_strs[1], 0); - if(grpc_slice_str_cmp( - decoded_slice, GRPC_END2END_HTTP_PROXY_TEST_CONNECT_CRED) != 0) { - goto done; - } - auth_header_matches = true; -done: - for(size_t i = 0; i < auth_header_nstrs; i++) { - gpr_free(auth_header_strs[i]); - } - gpr_free(auth_header_strs); - return auth_header_matches; + grpc_base64_decode(exec_ctx, proxy_auth_header_val, 0); + const bool header_matches = + grpc_slice_str_cmp(decoded_slice, expected_cred) == 0; + grpc_slice_unref_internal(exec_ctx, decoded_slice); + return header_matches; } // Callback to read the HTTP CONNECT request. @@ -395,23 +377,21 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // If proxy auth is being used, check if the header is present and as expected - if(grpc_channel_args_find( - conn->proxy->channel_args, - GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT) != NULL) { + const grpc_arg* proxy_auth = grpc_channel_args_find( + conn->proxy->channel_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + if (proxy_auth != NULL) { bool auth_header_found = false; - for(size_t i = 0; i < conn->http_request.hdr_count; i++) { - if(strcmp(conn->http_request.hdrs[i].key, "Proxy-Authorization") == 0) { - if(!proxy_auth_header_matches( - exec_ctx, conn->http_request.hdrs[i].value)) { - break; - } - auth_header_found = true; + for (size_t i = 0; i < conn->http_request.hdr_count; i++) { + if (strcmp(conn->http_request.hdrs[i].key, "Proxy-Authorization") == 0) { + auth_header_found = proxy_auth_header_matches( + exec_ctx, conn->http_request.hdrs[i].value, + proxy_auth->value.string); break; } } - if(!auth_header_found) { - const char *msg = "HTTP Connect could not verify authentication"; - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + if (!auth_header_found) { + const char* msg = "HTTP Connect could not verify authentication"; + error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(msg); proxy_connection_failed(exec_ctx, conn, true /* is_client */, "HTTP proxy read request", error); GRPC_ERROR_UNREF(error); @@ -503,7 +483,7 @@ static void thread_main(void* arg) { } grpc_end2end_http_proxy* grpc_end2end_http_proxy_create( - grpc_channel_args *args) { + grpc_channel_args* args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_end2end_http_proxy* proxy = (grpc_end2end_http_proxy*)gpr_malloc(sizeof(*proxy)); diff --git a/test/core/end2end/fixtures/http_proxy_fixture.h b/test/core/end2end/fixtures/http_proxy_fixture.h index f3da0494ae..103bd08196 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.h +++ b/test/core/end2end/fixtures/http_proxy_fixture.h @@ -22,20 +22,18 @@ #include <grpc/grpc.h> /* The test credentials being used for HTTP Proxy Authorization */ -#define GRPC_END2END_HTTP_PROXY_TEST_CONNECT_CRED "aladdin:opensesame" +#define GRPC_TEST_HTTP_PROXY_AUTH_CREDS "aladdin:opensesame" /* A channel arg key used to indicate that the channel uses proxy authorization. - * The value is of no consequence as just the presence of the argument is - * enough. It is currently kept as of type integer but can be changed as seen - * fit. + * The value (string) should be the proxy auth credentials that should be + * checked. */ -#define GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT \ - "grpc.test.connect_auth" +#define GRPC_ARG_HTTP_PROXY_AUTH_CREDS "grpc.test.proxy_auth" typedef struct grpc_end2end_http_proxy grpc_end2end_http_proxy; grpc_end2end_http_proxy* grpc_end2end_http_proxy_create( - grpc_channel_args *args); + grpc_channel_args* args); void grpc_end2end_http_proxy_destroy(grpc_end2end_http_proxy* proxy); diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index de8508cc15..18bae63a8a 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -24,9 +24,9 @@ import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', - 'fullstack includes_proxy dns_resolver name_resolution secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes enables_compression supports_compression is_inproc is_http2') + 'fullstack includes_proxy dns_resolver name_resolution secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes enables_compression supports_compression is_inproc is_http2 supports_proxy_auth') default_unsecure_fixture_options = FixtureOptions( - True, False, True, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [], True, False, True, False, True) + True, False, True, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [], True, False, True, False, True, False) socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv']) @@ -47,7 +47,7 @@ END2END_FIXTURES = { 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), 'h2_full+workarounds': default_unsecure_fixture_options, 'h2_http_proxy': default_unsecure_fixture_options._replace( - ci_mac=False, exclude_iomgrs=['uv']), + ci_mac=False, exclude_iomgrs=['uv'], supports_proxy_auth=True), 'h2_oauth2': default_secure_fixture_options._replace( ci_mac=False, exclude_iomgrs=['uv']), 'h2_proxy': default_unsecure_fixture_options._replace( @@ -69,8 +69,8 @@ END2END_FIXTURES = { TestOptions = collections.namedtuple( 'TestOptions', - 'needs_fullstack needs_dns needs_names proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky allows_compression needs_compression exclude_inproc needs_http2') -default_test_options = TestOptions(False, False, False, True, False, True, 1.0, [], False, False, True, False, False, False) + 'needs_fullstack needs_dns needs_names proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky allows_compression needs_compression exclude_inproc needs_http2 needs_proxy_auth') +default_test_options = TestOptions(False, False, False, True, False, True, 1.0, [], False, False, True, False, False, False, False) connectivity_test_options = default_test_options._replace(needs_fullstack=True) LOWCPU = 0.1 @@ -125,10 +125,10 @@ END2END_TESTS = { 'no_logging': default_test_options._replace(traceable=False), 'no_op': default_test_options, 'payload': default_test_options, - 'payload_with_proxy_auth': default_test_options, 'load_reporting_hook': default_test_options, 'ping_pong_streaming': default_test_options._replace(cpu_cost=LOWCPU), 'ping': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU), + 'proxy_auth': default_test_options._replace(needs_proxy_auth=True), 'registered_call': default_test_options, 'request_with_flags': default_test_options._replace( proxyable=False, cpu_cost=LOWCPU), @@ -179,6 +179,9 @@ def compatible(f, t): if END2END_TESTS[t].needs_http2: if not END2END_FIXTURES[f].is_http2: return False + if END2END_TESTS[t].needs_proxy_auth: + if not END2END_FIXTURES[f].supports_proxy_auth: + return False return True diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index 1f56ddb5af..6d1917c0ff 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -21,7 +21,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_sh_test", "grpc_cc_binary", "grpc_cc def fixture_options(fullstack=True, includes_proxy=False, dns_resolver=True, name_resolution=True, secure=True, tracing=False, platforms=['windows', 'linux', 'mac', 'posix'], - is_inproc=False, is_http2=True): + is_inproc=False, is_http2=True, supports_proxy_auth=False): return struct( fullstack=fullstack, includes_proxy=includes_proxy, @@ -30,7 +30,8 @@ def fixture_options(fullstack=True, includes_proxy=False, dns_resolver=True, secure=secure, tracing=tracing, is_inproc=is_inproc, - is_http2=is_http2 + is_http2=is_http2, + supports_proxy_auth=supports_proxy_auth #platforms=platforms ) @@ -47,7 +48,7 @@ END2END_FIXTURES = { 'h2_full+pipe': fixture_options(platforms=['linux']), 'h2_full+trace': fixture_options(tracing=True), 'h2_full+workarounds': fixture_options(), - 'h2_http_proxy': fixture_options(), + 'h2_http_proxy': fixture_options(supports_proxy_auth=True), 'h2_oauth2': fixture_options(), 'h2_proxy': fixture_options(includes_proxy=True), 'h2_sockpair_1byte': fixture_options(fullstack=False, dns_resolver=False), @@ -67,7 +68,8 @@ END2END_FIXTURES = { def test_options(needs_fullstack=False, needs_dns=False, needs_names=False, proxyable=True, secure=False, traceable=False, - exclude_inproc=False, needs_http2=False): + exclude_inproc=False, needs_http2=False, + needs_proxy_auth=False): return struct( needs_fullstack=needs_fullstack, needs_dns=needs_dns, @@ -76,7 +78,8 @@ def test_options(needs_fullstack=False, needs_dns=False, needs_names=False, secure=secure, traceable=traceable, exclude_inproc=exclude_inproc, - needs_http2=needs_http2 + needs_http2=needs_http2, + needs_proxy_auth=needs_proxy_auth ) @@ -120,10 +123,10 @@ END2END_TESTS = { 'no_logging': test_options(traceable=False), 'no_op': test_options(), 'payload': test_options(), - 'payload_with_proxy_auth': test_options(), 'load_reporting_hook': test_options(), 'ping_pong_streaming': test_options(), 'ping': test_options(needs_fullstack=True, proxyable=False), + 'proxy_auth': test_options(needs_proxy_auth=True), 'registered_call': test_options(), 'request_with_flags': test_options(proxyable=False), 'request_with_payload': test_options(), @@ -166,6 +169,9 @@ def compatible(fopt, topt): if topt.needs_http2: if not fopt.is_http2: return False + if topt.needs_proxy_auth: + if not fopt.supports_proxy_auth: + return False return True diff --git a/test/core/end2end/tests/payload_with_proxy_auth.c b/test/core/end2end/tests/proxy_auth.c index 4d176f9145..d922049bcb 100644 --- a/test/core/end2end/tests/payload_with_proxy_auth.c +++ b/test/core/end2end/tests/proxy_auth.c @@ -16,6 +16,10 @@ * */ +/** + * This test is for checking whether proxy authentication is working with HTTP + * Connect. + */ #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/fixtures/http_proxy_fixture.h" @@ -23,10 +27,12 @@ #include <string.h> #include <grpc/byte_buffer.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/time.h> #include <grpc/support/useful.h> +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" static void *tag(intptr_t t) { return (void *)t; } @@ -85,53 +91,24 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->shutdown_cq); } -/* Creates and returns a grpc_slice containing random alphanumeric characters. - */ -static grpc_slice generate_random_slice() { - size_t i; - static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; - char *output; - const size_t output_size = 1024 * 1024; - output = gpr_malloc(output_size); - for (i = 0; i < output_size - 1; ++i) { - output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; - } - output[output_size - 1] = '\0'; - grpc_slice out = grpc_slice_from_copied_string(output); - gpr_free(output); - return out; -} - -static void request_response_with_payload_and_proxy_auth - (grpc_end2end_test_config config, - grpc_end2end_test_fixture f) { - /* Create large request and response bodies. These are big enough to require - * multiple round trips to deliver to the peer, and their exact contents of - * will be verified on completion. */ - grpc_slice request_payload_slice = generate_random_slice(); - grpc_slice response_payload_slice = generate_random_slice(); - +static void simple_request_body(grpc_end2end_test_config config, + grpc_end2end_test_fixture f) { grpc_call *c; grpc_call *s; - grpc_byte_buffer *request_payload = - grpc_raw_byte_buffer_create(&request_payload_slice, 1); - grpc_byte_buffer *response_payload = - grpc_raw_byte_buffer_create(&response_payload_slice, 1); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; grpc_metadata_array initial_metadata_recv; grpc_metadata_array trailing_metadata_recv; grpc_metadata_array request_metadata_recv; - grpc_byte_buffer *request_payload_recv = NULL; - grpc_byte_buffer *response_payload_recv = NULL; grpc_call_details call_details; grpc_status_code status; grpc_call_error error; grpc_slice details; int was_cancelled = 2; + char *peer; - gpr_timespec deadline = n_seconds_from_now(60); + gpr_timespec deadline = five_seconds_from_now(); c = grpc_channel_create_call( f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, grpc_slice_from_static_string("/foo"), @@ -139,6 +116,11 @@ static void request_response_with_payload_and_proxy_auth NULL); GPR_ASSERT(c); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != NULL); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); grpc_metadata_array_init(&request_metadata_recv); @@ -151,11 +133,6 @@ static void request_response_with_payload_and_proxy_auth op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message.send_message = request_payload; - op->flags = 0; - op->reserved = NULL; - op++; op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; op->flags = 0; op->reserved = NULL; @@ -165,11 +142,6 @@ static void request_response_with_payload_and_proxy_auth op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &response_payload_recv; - op->flags = 0; - op->reserved = NULL; - op++; op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; op->data.recv_status_on_client.status = &status; @@ -187,6 +159,15 @@ static void request_response_with_payload_and_proxy_auth CQ_EXPECT_COMPLETION(cqv, tag(101), 1); cq_verify(cqv); + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != NULL); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != NULL); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; @@ -194,53 +175,33 @@ static void request_response_with_payload_and_proxy_auth op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &request_payload_recv; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED; + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; op->flags = 0; op->reserved = NULL; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); - GPR_ASSERT(GRPC_CALL_OK == error); - - CQ_EXPECT_COMPLETION(cqv, tag(102), 1); - cq_verify(cqv); - - memset(ops, 0, sizeof(ops)); - op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message.send_message = response_payload; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - grpc_slice status_details = grpc_slice_from_static_string("xyz"); - op->data.send_status_from_server.status_details = &status_details; - op->flags = 0; - op->reserved = NULL; - op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - CQ_EXPECT_COMPLETION(cqv, tag(103), 1); + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); CQ_EXPECT_COMPLETION(cqv, tag(1), 1); cq_verify(cqv); - GPR_ASSERT(status == GRPC_STATUS_OK); + GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); validate_host_override_string("foo.test.google.fr:1234", call_details.host, config); - GPR_ASSERT(was_cancelled == 0); - GPR_ASSERT(byte_buffer_eq_slice(request_payload_recv, request_payload_slice)); - GPR_ASSERT( - byte_buffer_eq_slice(response_payload_recv, response_payload_slice)); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); grpc_slice_unref(details); grpc_metadata_array_destroy(&initial_metadata_recv); @@ -252,51 +213,23 @@ static void request_response_with_payload_and_proxy_auth grpc_call_unref(s); cq_verifier_destroy(cqv); - - grpc_byte_buffer_destroy(request_payload); - grpc_byte_buffer_destroy(response_payload); - grpc_byte_buffer_destroy(request_payload_recv); - grpc_byte_buffer_destroy(response_payload_recv); -} - -/* Client sends a request with payload, server reads then returns a response - payload and status. */ -static void test_invoke_request_response_with_payload_and_proxy_auth( - grpc_end2end_test_config config) { - /* Indicate that the proxy requires user auth */ - grpc_arg client_arg = {.type = GRPC_ARG_INTEGER, - .key = GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT, - .value.integer = 0}; - grpc_channel_args client_args = {.num_args = 1, .args = &client_arg}; - grpc_end2end_test_fixture f = begin_test( - config, "test_invoke_request_response_with_payload_and_proxy_auth", - &client_args, NULL); - request_response_with_payload_and_proxy_auth(config, f); - end_test(&f); - config.tear_down_data(&f); } -static void test_invoke_10_request_response_with_payload_and_proxy_auth( - grpc_end2end_test_config config) { - int i; +static void test_invoke_proxy_auth(grpc_end2end_test_config config) { /* Indicate that the proxy requires user auth */ - grpc_arg client_arg = {.type = GRPC_ARG_INTEGER, - .key = GRPC_END2END_HTTP_PROXY_TEST_CONNECT_AUTH_PRESENT, - .value.integer = 0}; + grpc_arg client_arg = {.type = GRPC_ARG_STRING, + .key = GRPC_ARG_HTTP_PROXY_AUTH_CREDS, + .value.string = GRPC_TEST_HTTP_PROXY_AUTH_CREDS}; grpc_channel_args client_args = {.num_args = 1, .args = &client_arg}; - grpc_end2end_test_fixture f = begin_test( - config, "test_invoke_10_request_response_with_payload_and_proxy_auth", - &client_args, NULL); - for (i = 0; i < 10; i++) { - request_response_with_payload_and_proxy_auth(config, f); - } + grpc_end2end_test_fixture f = + begin_test(config, "test_invoke_proxy_auth", &client_args, NULL); + simple_request_body(config, f); end_test(&f); config.tear_down_data(&f); } -void payload_with_proxy_auth(grpc_end2end_test_config config) { - test_invoke_request_response_with_payload_and_proxy_auth(config); - test_invoke_10_request_response_with_payload_and_proxy_auth(config); +void proxy_auth(grpc_end2end_test_config config) { + test_invoke_proxy_auth(config); } -void payload_with_proxy_auth_pre_init(void) {} +void proxy_auth_pre_init(void) {} diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 313a174b33..cbd0e1d9d7 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -7337,9 +7337,9 @@ "test/core/end2end/tests/no_logging.c", "test/core/end2end/tests/no_op.c", "test/core/end2end/tests/payload.c", - "test/core/end2end/tests/payload_with_proxy_auth.c", "test/core/end2end/tests/ping.c", "test/core/end2end/tests/ping_pong_streaming.c", + "test/core/end2end/tests/proxy_auth.c", "test/core/end2end/tests/registered_call.c", "test/core/end2end/tests/request_with_flags.c", "test/core/end2end/tests/request_with_payload.c", @@ -7415,9 +7415,9 @@ "test/core/end2end/tests/no_logging.c", "test/core/end2end/tests/no_op.c", "test/core/end2end/tests/payload.c", - "test/core/end2end/tests/payload_with_proxy_auth.c", "test/core/end2end/tests/ping.c", "test/core/end2end/tests/ping_pong_streaming.c", + "test/core/end2end/tests/proxy_auth.c", "test/core/end2end/tests/registered_call.c", "test/core/end2end/tests/request_with_flags.c", "test/core/end2end/tests/request_with_payload.c", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 901e869e7c..767a5ce147 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -6631,29 +6631,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_census_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -7923,29 +7900,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -9155,28 +9109,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -10309,29 +10241,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_fd_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -11555,29 +11464,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -12695,25 +12581,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -13865,29 +13732,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -15157,29 +15001,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+workarounds_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -16482,14 +16303,14 @@ }, { "args": [ - "payload_with_proxy_auth" + "ping" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -16506,7 +16327,7 @@ }, { "args": [ - "ping" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -16530,14 +16351,14 @@ }, { "args": [ - "ping_pong_streaming" + "proxy_auth" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -17793,29 +17614,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -19118,30 +18916,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -20294,30 +20068,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -21446,30 +21196,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -22574,30 +22300,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -23790,32 +23492,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -25061,29 +24737,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -26353,29 +26006,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -27510,30 +27140,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -28722,29 +28328,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -29757,29 +29340,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "inproc_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -30980,29 +30540,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_census_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -32249,29 +31786,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -33376,29 +32890,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_fd_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -34599,29 +34090,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -35720,25 +35188,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -36867,29 +36316,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -38136,29 +37562,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_full+workarounds_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -39437,14 +38840,14 @@ }, { "args": [ - "payload_with_proxy_auth" + "ping" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -39461,7 +38864,7 @@ }, { "args": [ - "ping" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -39485,14 +38888,14 @@ }, { "args": [ - "ping_pong_streaming" + "proxy_auth" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [ "uv" @@ -40725,29 +40128,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -41858,30 +41238,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_proxy_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -42986,30 +42342,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -44090,30 +43422,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -45280,32 +44588,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ @@ -46501,29 +45783,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "language": "c", - "name": "h2_uds_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping" ], "ci_platforms": [ @@ -47513,29 +46772,6 @@ }, { "args": [ - "payload_with_proxy_auth" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "language": "c", - "name": "inproc_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ "ping_pong_streaming" ], "ci_platforms": [ diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 3a45ed619c..249d99b526 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -227,12 +227,12 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c"> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload_with_proxy_auth.c"> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping_pong_streaming.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\proxy_auth.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\registered_call.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\request_with_flags.c"> diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 69bcf02b43..3a2105ebe8 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -115,15 +115,15 @@ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload_with_proxy_auth.c"> - <Filter>test\core\end2end\tests</Filter> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping_pong_streaming.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\proxy_auth.c"> + <Filter>test\core\end2end\tests</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\registered_call.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index fe1f627980..b7a2ecd27b 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -229,12 +229,12 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c"> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload_with_proxy_auth.c"> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping_pong_streaming.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\proxy_auth.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\registered_call.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\request_with_flags.c"> diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 255a76e107..1626b77d14 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -118,15 +118,15 @@ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> - <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload_with_proxy_auth.c"> - <Filter>test\core\end2end\tests</Filter> - </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\ping_pong_streaming.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\proxy_auth.c"> + <Filter>test\core\end2end\tests</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\registered_call.c"> <Filter>test\core\end2end\tests</Filter> </ClCompile> |