diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 6b105def33c..c5c862bbf24 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -43,6 +43,8 @@ #include #include "test/core/end2end/cq_verifier.h" +static char *authority; + static void *tag(intptr_t t) { return (void *)t; } static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, @@ -147,7 +149,7 @@ static void test_request_response_with_metadata_and_payload( int was_cancelled = 2; c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", "foo.test.google.fr", deadline, NULL); + "/foo", authority, deadline, NULL); GPR_ASSERT(c); grpc_metadata_array_init(&initial_metadata_recv); @@ -248,7 +250,9 @@ static void test_request_response_with_metadata_and_payload( GPR_ASSERT(status == GRPC_STATUS_OK); GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); - GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); + if (authority) { + GPR_ASSERT(0 == strcmp(call_details.host, authority)); + } GPR_ASSERT(was_cancelled == 0); GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you")); @@ -286,6 +290,7 @@ static void test_request_response_with_metadata_and_payload( } void binary_metadata(grpc_end2end_test_config config) { + authority = validate_host_override_string("foo.test.google.fr", config); test_request_response_with_metadata_and_payload(config); }