aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/simple_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/tests/simple_request.c')
-rw-r--r--test/core/end2end/tests/simple_request.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index ed7b850808..2dea5d6af2 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -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) {
+static void simple_request_body(grpc_end2end_test_config config,
+ grpc_end2end_test_fixture f) {
grpc_call *c;
grpc_call *s;
gpr_timespec deadline = five_seconds_time();
@@ -115,9 +116,10 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
char *peer;
- c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
- "/foo", "foo.test.google.fr:1234", deadline,
- NULL);
+ c = grpc_channel_create_call(
+ f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo",
+ get_host_override_string("foo.test.google.fr:1234", config), deadline,
+ NULL);
GPR_ASSERT(c);
peer = grpc_call_get_peer(c);
@@ -202,7 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
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(0 == call_details.flags);
GPR_ASSERT(was_cancelled == 1);
@@ -222,7 +225,7 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
f = begin_test(config, "test_invoke_simple_request", NULL, NULL);
- simple_request_body(f);
+ simple_request_body(config, f);
end_test(&f);
config.tear_down_data(&f);
}
@@ -232,7 +235,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
for (i = 0; i < 10; i++) {
- simple_request_body(f);
+ simple_request_body(config, f);
gpr_log(GPR_INFO, "Passed simple request %d", i);
}
end_test(&f);