aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/httpcli/httpscli_test.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-08 22:03:36 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-08 22:03:36 -0800
commited2164db57d471f34c31ed74fd0b179028c6182e (patch)
tree4bcdbae329597191d6b8a911074c9632995f1d91 /test/core/httpcli/httpscli_test.c
parent6d37d0bded605da74c17af087635970d1d8008fa (diff)
Fixes, review feedback
Diffstat (limited to 'test/core/httpcli/httpscli_test.c')
-rw-r--r--test/core/httpcli/httpscli_test.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/core/httpcli/httpscli_test.c b/test/core/httpcli/httpscli_test.c
index 9b3c95e162..b1c1913cae 100644
--- a/test/core/httpcli/httpscli_test.c
+++ b/test/core/httpcli/httpscli_test.c
@@ -69,13 +69,13 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg,
gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset));
}
-static void test_get(int use_ssl, int port) {
+static void test_get(int port) {
grpc_httpcli_request req;
char *host;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
g_done = 0;
- gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_get", use_ssl);
+ gpr_log(GPR_INFO, "test_get");
gpr_asprintf(&host, "localhost:%d", port);
gpr_log(GPR_INFO, "requesting from %s", host);
@@ -84,7 +84,7 @@ static void test_get(int use_ssl, int port) {
req.host = host;
req.ssl_host_override = "foo.test.google.fr";
req.path = "/get";
- req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ req.handshaker = &grpc_httpcli_ssl;
grpc_httpcli_get(&exec_ctx, &g_context, &g_pollset, &req, n_seconds_time(15),
on_finish, (void *)42);
@@ -101,13 +101,13 @@ static void test_get(int use_ssl, int port) {
gpr_free(host);
}
-static void test_post(int use_ssl, int port) {
+static void test_post(int port) {
grpc_httpcli_request req;
char *host;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
g_done = 0;
- gpr_log(GPR_INFO, "running %s with use_ssl=%d.", "test_post", (int)use_ssl);
+ gpr_log(GPR_INFO, "test_post");
gpr_asprintf(&host, "localhost:%d", port);
gpr_log(GPR_INFO, "posting to %s", host);
@@ -116,7 +116,7 @@ static void test_post(int use_ssl, int port) {
req.host = host;
req.ssl_host_override = "foo.test.google.fr";
req.path = "/post";
- req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ req.handshaker = &grpc_httpcli_ssl;
grpc_httpcli_post(&exec_ctx, &g_context, &g_pollset, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
@@ -173,8 +173,8 @@ int main(int argc, char **argv) {
grpc_httpcli_context_init(&g_context);
grpc_pollset_init(&g_pollset);
- test_get(1, port);
- test_post(1, port);
+ test_get(port);
+ test_post(port);
grpc_httpcli_context_destroy(&g_context);
grpc_closure_init(&destroyed, destroy_pollset, &g_pollset);