aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/security
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:53:14 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:53:14 -0700
commit098047b53abfb3142b0dc9eca83564cd565902b7 (patch)
tree463bb5d60f365f4c7a5e3a6e77ff77bc09ae80c2 /test/core/security
parent9fa914e554826f3d11663263498df829e0b1b94e (diff)
Rename run
Diffstat (limited to 'test/core/security')
-rw-r--r--test/core/security/credentials_test.c34
-rw-r--r--test/core/security/jwt_verifier_test.c14
-rw-r--r--test/core/security/oauth2_utils.c4
-rw-r--r--test/core/security/print_google_default_creds_token.c2
-rw-r--r--test/core/security/secure_endpoint_test.c8
-rw-r--r--test/core/security/verify_jwt.c2
6 files changed, 32 insertions, 32 deletions
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index 3facb9556f..5e5b69f16c 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -309,7 +309,7 @@ test_google_iam_creds (void)
GPR_ASSERT (grpc_credentials_has_request_metadata (creds));
GPR_ASSERT (grpc_credentials_has_request_metadata_only (creds));
grpc_credentials_get_request_metadata (creds, NULL, test_service_url, check_google_iam_metadata, creds, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -332,7 +332,7 @@ test_access_token_creds (void)
GPR_ASSERT (grpc_credentials_has_request_metadata_only (creds));
GPR_ASSERT (strcmp (creds->type, GRPC_CREDENTIALS_TYPE_OAUTH2) == 0);
grpc_credentials_get_request_metadata (creds, NULL, test_service_url, check_access_token_metadata, creds, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -366,7 +366,7 @@ test_ssl_oauth2_composite_creds (void)
GPR_ASSERT (strcmp (creds_array->creds_array[0]->type, GRPC_CREDENTIALS_TYPE_SSL) == 0);
GPR_ASSERT (strcmp (creds_array->creds_array[1]->type, GRPC_CREDENTIALS_TYPE_OAUTH2) == 0);
grpc_credentials_get_request_metadata (composite_creds, NULL, test_service_url, check_ssl_oauth2_composite_metadata, composite_creds, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
void
@@ -422,7 +422,7 @@ test_ssl_oauth2_google_iam_composite_creds (void)
GPR_ASSERT (strcmp (creds_array->creds_array[1]->type, GRPC_CREDENTIALS_TYPE_OAUTH2) == 0);
GPR_ASSERT (strcmp (creds_array->creds_array[2]->type, GRPC_CREDENTIALS_TYPE_IAM) == 0);
grpc_credentials_get_request_metadata (composite_creds, NULL, test_service_url, check_ssl_oauth2_google_iam_composite_metadata, composite_creds, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -499,12 +499,12 @@ test_compute_engine_creds_success (void)
/* First request: http get should be called. */
grpc_httpcli_set_override (compute_engine_httpcli_get_success_override, httpcli_post_should_not_be_called);
grpc_credentials_get_request_metadata (compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
/* Second request: the cached token should be served directly. */
grpc_httpcli_set_override (httpcli_get_should_not_be_called, httpcli_post_should_not_be_called);
grpc_credentials_get_request_metadata (compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
grpc_credentials_unref (compute_engine_creds);
grpc_httpcli_set_override (NULL, NULL);
@@ -521,7 +521,7 @@ test_compute_engine_creds_failure (void)
grpc_credentials_get_request_metadata (compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_failure, (void *) test_user_data, &closure_list);
grpc_credentials_unref (compute_engine_creds);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -573,16 +573,16 @@ test_refresh_token_creds_success (void)
/* First request: http get should be called. */
grpc_httpcli_set_override (httpcli_get_should_not_be_called, refresh_token_httpcli_post_success);
grpc_credentials_get_request_metadata (refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
/* Second request: the cached token should be served directly. */
grpc_httpcli_set_override (httpcli_get_should_not_be_called, httpcli_post_should_not_be_called);
grpc_credentials_get_request_metadata (refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
grpc_credentials_unref (refresh_token_creds);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -597,7 +597,7 @@ test_refresh_token_creds_failure (void)
grpc_credentials_get_request_metadata (refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_failure, (void *) test_user_data, &closure_list);
grpc_credentials_unref (refresh_token_creds);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -670,18 +670,18 @@ test_jwt_creds_success (void)
/* First request: jwt_encode_and_sign should be called. */
grpc_jwt_encode_and_sign_set_override (encode_and_sign_jwt_success);
grpc_credentials_get_request_metadata (jwt_creds, NULL, test_service_url, on_jwt_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
/* Second request: the cached token should be served directly. */
grpc_jwt_encode_and_sign_set_override (encode_and_sign_jwt_should_not_be_called);
grpc_credentials_get_request_metadata (jwt_creds, NULL, test_service_url, on_jwt_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
/* Third request: Different service url so jwt_encode_and_sign should be
called again (no caching). */
grpc_jwt_encode_and_sign_set_override (encode_and_sign_jwt_success);
grpc_credentials_get_request_metadata (jwt_creds, NULL, other_test_service_url, on_jwt_creds_get_metadata_success, (void *) test_user_data, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
gpr_free (json_key_string);
grpc_credentials_unref (jwt_creds);
@@ -703,7 +703,7 @@ test_jwt_creds_signing_failure (void)
gpr_free (json_key_string);
grpc_credentials_unref (jwt_creds);
grpc_jwt_encode_and_sign_set_override (NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -858,7 +858,7 @@ test_metadata_plugin_success (void)
GPR_ASSERT (state == PLUGIN_GET_METADATA_CALLED_STATE);
grpc_credentials_release (creds);
GPR_ASSERT (state == PLUGIN_DESTROY_CALLED_STATE);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -879,7 +879,7 @@ test_metadata_plugin_failure (void)
GPR_ASSERT (state == PLUGIN_GET_METADATA_CALLED_STATE);
grpc_credentials_release (creds);
GPR_ASSERT (state == PLUGIN_DESTROY_CALLED_STATE);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
int
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c
index 8832dca817..2883cf858b 100644
--- a/test/core/security/jwt_verifier_test.c
+++ b/test/core/security/jwt_verifier_test.c
@@ -236,7 +236,7 @@ test_jwt_verifier_google_email_issuer_success (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static int
@@ -269,7 +269,7 @@ test_jwt_verifier_custom_email_issuer_success (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static int
@@ -315,7 +315,7 @@ test_jwt_verifier_url_issuer_success (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -354,7 +354,7 @@ test_jwt_verifier_url_issuer_bad_config (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -375,7 +375,7 @@ test_jwt_verifier_bad_json_key (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static void
@@ -423,7 +423,7 @@ test_jwt_verifier_bad_signature (void)
gpr_free (jwt);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
static int
@@ -450,7 +450,7 @@ test_jwt_verifier_bad_format (void)
grpc_jwt_verifier_verify (verifier, NULL, "bad jwt", expected_audience, on_verification_bad_format, (void *) expected_user_data, &closure_list);
grpc_jwt_verifier_destroy (verifier);
grpc_httpcli_set_override (NULL, NULL);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
}
/* find verification key: bad jks, cannot find key in jks */
diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c
index 9035557a41..f096fa9ca8 100644
--- a/test/core/security/oauth2_utils.c
+++ b/test/core/security/oauth2_utils.c
@@ -94,7 +94,7 @@ grpc_test_fetch_oauth2_token_with_credentials (grpc_credentials * creds)
grpc_credentials_get_request_metadata (creds, &request.pollset, "", on_oauth2_response, &request, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
gpr_mu_lock (GRPC_POLLSET_MU (&request.pollset));
while (!request.is_done)
@@ -105,7 +105,7 @@ grpc_test_fetch_oauth2_token_with_credentials (grpc_credentials * creds)
gpr_mu_unlock (GRPC_POLLSET_MU (&request.pollset));
grpc_pollset_shutdown (&request.pollset, &do_nothing_closure, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
grpc_pollset_destroy (&request.pollset);
return request.token;
}
diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c
index 3f6720b6ea..51a0968a20 100644
--- a/test/core/security/print_google_default_creds_token.c
+++ b/test/core/security/print_google_default_creds_token.c
@@ -105,7 +105,7 @@ main (int argc, char **argv)
grpc_pollset_worker worker;
grpc_pollset_work (&sync.pollset, &worker, gpr_now (GPR_CLOCK_MONOTONIC), gpr_inf_future (GPR_CLOCK_MONOTONIC), &closure_list);
gpr_mu_unlock (GRPC_POLLSET_MU (&sync.pollset));
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
gpr_mu_lock (GRPC_POLLSET_MU (&sync.pollset));
}
gpr_mu_unlock (GRPC_POLLSET_MU (&sync.pollset));
diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c
index 595e84c8b1..bd760320cc 100644
--- a/test/core/security/secure_endpoint_test.c
+++ b/test/core/security/secure_endpoint_test.c
@@ -110,7 +110,7 @@ secure_endpoint_create_fixture_tcp_socketpair (size_t slice_size, gpr_slice * le
}
f.server_ep = grpc_secure_endpoint_create (fake_write_protector, tcp.server, NULL, 0);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
return f;
}
@@ -162,7 +162,7 @@ test_leftover (grpc_endpoint_test_config config, size_t slice_size)
gpr_slice_buffer_init (&incoming);
grpc_closure_init (&done_closure, inc_call_ctr, &n);
grpc_endpoint_read (f.client_ep, &incoming, &done_closure, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
GPR_ASSERT (n == 1);
GPR_ASSERT (incoming.count == 1);
GPR_ASSERT (0 == gpr_slice_cmp (s, incoming.slices[0]));
@@ -171,7 +171,7 @@ test_leftover (grpc_endpoint_test_config config, size_t slice_size)
grpc_endpoint_shutdown (f.server_ep, &closure_list);
grpc_endpoint_destroy (f.client_ep, &closure_list);
grpc_endpoint_destroy (f.server_ep, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
gpr_slice_unref (s);
gpr_slice_buffer_destroy (&incoming);
@@ -197,7 +197,7 @@ main (int argc, char **argv)
test_leftover (configs[1], 1);
grpc_closure_init (&destroyed, destroy_pollset, &g_pollset);
grpc_pollset_shutdown (&g_pollset, &destroyed, &closure_list);
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
grpc_shutdown ();
return 0;
diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c
index fd8aaeb484..d7d261299e 100644
--- a/test/core/security/verify_jwt.c
+++ b/test/core/security/verify_jwt.c
@@ -121,7 +121,7 @@ main (int argc, char **argv)
grpc_pollset_worker worker;
grpc_pollset_work (&sync.pollset, &worker, gpr_now (GPR_CLOCK_MONOTONIC), gpr_inf_future (GPR_CLOCK_MONOTONIC), &closure_list);
gpr_mu_unlock (GRPC_POLLSET_MU (&sync.pollset));
- grpc_closure_list_run (&closure_list);
+ grpc_exec_ctx_finish (&exec_ctx);
gpr_mu_lock (GRPC_POLLSET_MU (&sync.pollset));
}
gpr_mu_unlock (GRPC_POLLSET_MU (&sync.pollset));