aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/registered_call.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-08 08:46:46 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-08 08:46:46 -0800
commiteba86e18531c653d47b10645bd77ae4930bce563 (patch)
treeed3045218d4563257742f13e6d750c7cafa92cab /test/core/end2end/tests/registered_call.c
parent3a41bbbe9bf3da96a7aead551b43f72bd470d1c0 (diff)
parent03a58cf3873879a4e4470a437e2c0b42c75c6a7c (diff)
Merge github.com:grpc/grpc into securityfuzzit
Diffstat (limited to 'test/core/end2end/tests/registered_call.c')
-rw-r--r--test/core/end2end/tests/registered_call.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index 4c094e1b8b..6594b420b9 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
- config.init_client(&f, client_args, NULL);
+ config.init_client(&f, client_args);
return f;
}
@@ -97,7 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f, void *rc) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -186,7 +187,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
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"));
+ validate_host_override_string("foo.test.google.fr:1234", call_details.host,
+ config);
GPR_ASSERT(was_cancelled == 1);
gpr_free(details);
@@ -204,10 +206,11 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_simple_request", NULL, NULL);
- void *rc = grpc_channel_register_call(f.client, "/foo",
- "foo.test.google.fr:1234", NULL);
+ void *rc = grpc_channel_register_call(
+ f.client, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), NULL);
- simple_request_body(f, rc);
+ simple_request_body(config, f, rc);
end_test(&f);
config.tear_down_data(&f);
}
@@ -216,11 +219,12 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
int i;
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
- void *rc = grpc_channel_register_call(f.client, "/foo",
- "foo.test.google.fr:1234", NULL);
+ void *rc = grpc_channel_register_call(
+ f.client, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f, rc);
+ simple_request_body(config, f, rc);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);