aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/hpack_size.c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2016-09-19 16:48:36 -0700
committerGravatar Muxi Yan <mxyan@google.com>2016-09-20 10:16:55 -0700
commit6d686451627122eeb5a07da2ede2cebc1c289acd (patch)
tree81ab20d2e2ac76832c3c74befbfdae3a83b0ae29 /test/core/end2end/tests/hpack_size.c
parenta6a6fa4f12c5634d87d8b4e64fa50c3618586a7c (diff)
Update unit tests and fixtures with AUTHORITY_HEADER support option
Diffstat (limited to 'test/core/end2end/tests/hpack_size.c')
-rw-r--r--test/core/end2end/tests/hpack_size.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c
index fb00ae4eaa..c207639f7b 100644
--- a/test/core/end2end/tests/hpack_size.c
+++ b/test/core/end2end/tests/hpack_size.c
@@ -47,6 +47,8 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
+static char *authority;
+
static void *tag(intptr_t t) { return (void *)t; }
const char *hobbits[][2] = {
@@ -269,7 +271,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
extra_metadata[2].value_length = strlen(extra_metadata[2].value);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
+ "/foo", authority, deadline,
NULL);
GPR_ASSERT(c);
@@ -342,7 +344,9 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
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:1234"));
+ if (authority) {
+ GPR_ASSERT(0 == strcmp(call_details.host, authority));
+ }
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -395,6 +399,7 @@ void hpack_size(grpc_end2end_test_config config) {
1000, 32768, 4 * 1024 * 1024};
size_t i, j;
+ authority = validate_host_override_string("foo.test.google.fr:1234", config);
for (i = 0; i < GPR_ARRAY_SIZE(interesting_sizes); i++) {
for (j = 0; j < GPR_ARRAY_SIZE(interesting_sizes); j++) {
test_size(config, interesting_sizes[i], interesting_sizes[j]);