aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/binary_metadata.c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2016-09-22 16:23:10 -0700
committerGravatar Muxi Yan <mxyan@google.com>2016-09-28 16:19:43 -0700
commitcaa904486ee11d7dfc369a48db1bc6dee4f216c3 (patch)
tree0e489c8e22f122c9d6a97c61943fb999e1d7bb9b /test/core/end2end/tests/binary_metadata.c
parent6d686451627122eeb5a07da2ede2cebc1c289acd (diff)
Minor end2end test update
Diffstat (limited to 'test/core/end2end/tests/binary_metadata.c')
-rw-r--r--test/core/end2end/tests/binary_metadata.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 6b105def33..c5c862bbf2 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -43,6 +43,8 @@
#include <grpc/support/useful.h>
#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);
}