diff options
Diffstat (limited to 'test/core/security/fetch_oauth2.c')
-rw-r--r-- | test/core/security/fetch_oauth2.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index bd314e90d8..292f59a7c1 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -42,19 +42,16 @@ #include <grpc/support/slice.h> #include <grpc/support/sync.h> -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/support/load_file.h" +#include "src/core/lib/iomgr/load_file.h" +#include "src/core/lib/security/credentials/credentials.h" #include "test/core/security/oauth2_utils.h" static grpc_call_credentials *create_refresh_token_creds( const char *json_refresh_token_file_path) { - int success; - gpr_slice refresh_token = - gpr_load_file(json_refresh_token_file_path, 1, &success); - if (!success) { - gpr_log(GPR_ERROR, "Could not read file %s.", json_refresh_token_file_path); - exit(1); - } + gpr_slice refresh_token; + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "load_file", + grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); return grpc_google_refresh_token_credentials_create( (const char *)GPR_SLICE_START_PTR(refresh_token), NULL); } |