diff options
author | Muxi Yan <mxyan@google.com> | 2016-10-30 23:39:41 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2016-10-30 23:42:38 -0700 |
commit | ea3b568b8fef498f6aeec4349702c588afe709da (patch) | |
tree | aee9b1cbc221d55dd609bb6f7022d28cb787905a /test/core/end2end/tests/compressed_payload.c | |
parent | 56456c38e070aa07bbef7748b46cacfae5d3c671 (diff) |
Put validation of host name in a function
Diffstat (limited to 'test/core/end2end/tests/compressed_payload.c')
-rw-r--r-- | test/core/end2end/tests/compressed_payload.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 5925ce7b81..b1869c5945 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -242,9 +242,7 @@ static void request_for_disabled_algorithm( GPR_ASSERT(0 == strcmp(details, expected_details)); gpr_free(expected_details); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); - if (authority) { - GPR_ASSERT(0 == strcmp(call_details.host, authority)); - } + validate_host_override_string("foo.test.google.fr:1234", call_details.host, config); gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); @@ -493,9 +491,7 @@ static void request_with_payload_template( GPR_ASSERT(status == GRPC_STATUS_OK); GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); - if (authority) { - GPR_ASSERT(0 == strcmp(call_details.host, authority)); - } + validate_host_override_string("foo.test.google.fr:1234", call_details.host, config); GPR_ASSERT(was_cancelled == 0); gpr_free(details); |