@@ -3204,8 +3204,7 @@ TEST_F(ExternalAccountCredentialsTest, FailureInvalidTokenUrl) {
32043204 HttpRequest::SetOverride (httpcli_get_should_not_be_called,
32053205 httpcli_post_should_not_be_called,
32063206 httpcli_put_should_not_be_called);
3207- // TODO(roth): This should return UNAUTHENTICATED.
3208- grpc_error_handle expected_error = absl::UnknownError (
3207+ grpc_error_handle expected_error = absl::UnauthenticatedError (
32093208 " error fetching oauth2 token: Invalid token url: "
32103209 " invalid_token_url. Error: INVALID_ARGUMENT: Could not parse "
32113210 " 'scheme' from uri 'invalid_token_url'. Scheme not found." );
@@ -3243,8 +3242,7 @@ TEST_F(ExternalAccountCredentialsTest,
32433242 HttpRequest::SetOverride (httpcli_get_should_not_be_called,
32443243 external_account_creds_httpcli_post_success,
32453244 httpcli_put_should_not_be_called);
3246- // TODO(roth): This should return UNAUTHENTICATED.
3247- grpc_error_handle expected_error = absl::UnknownError (
3245+ grpc_error_handle expected_error = absl::UnauthenticatedError (
32483246 " error fetching oauth2 token: Invalid service account impersonation url: "
32493247 " invalid_service_account_impersonation_url. Error: INVALID_ARGUMENT: "
32503248 " Could not parse 'scheme' from uri "
@@ -3284,8 +3282,7 @@ TEST_F(ExternalAccountCredentialsTest,
32843282 httpcli_get_should_not_be_called,
32853283 external_account_creds_httpcli_post_failure_token_exchange_response_missing_access_token,
32863284 httpcli_put_should_not_be_called);
3287- // TODO(roth): This should return UNAUTHENTICATED.
3288- grpc_error_handle expected_error = absl::UnknownError (
3285+ grpc_error_handle expected_error = absl::UnauthenticatedError (
32893286 " error fetching oauth2 token: Missing or invalid access_token in "
32903287 " {\" not_access_token\" :\" not_access_token\" ,\" expires_in\" :3599, "
32913288 " \" token_type\" :\" Bearer\" }." );
@@ -3607,8 +3604,7 @@ TEST_F(ExternalAccountCredentialsTest,
36073604 HttpRequest::SetOverride (httpcli_get_should_not_be_called,
36083605 httpcli_post_should_not_be_called,
36093606 httpcli_put_should_not_be_called);
3610- // TODO(roth): This should return UNAVAILABLE.
3611- grpc_error_handle expected_error = absl::InternalError (
3607+ grpc_error_handle expected_error = absl::UnavailableError (
36123608 " error fetching oauth2 token: Failed to load file: "
36133609 " non_exisiting_file due to error(fdopen): No such file or directory" );
36143610 auto state = RequestMetadataState::NewInstance (expected_error, {});
@@ -3658,8 +3654,7 @@ TEST_F(ExternalAccountCredentialsTest,
36583654 HttpRequest::SetOverride (httpcli_get_should_not_be_called,
36593655 httpcli_post_should_not_be_called,
36603656 httpcli_put_should_not_be_called);
3661- // TODO(roth): This should return UNAUTHENTICATED.
3662- grpc_error_handle expected_error = absl::UnknownError (
3657+ grpc_error_handle expected_error = absl::UnauthenticatedError (
36633658 " error fetching oauth2 token: The content of the file is not a "
36643659 " valid json object." );
36653660 auto state = RequestMetadataState::NewInstance (expected_error, {});
@@ -4364,8 +4359,7 @@ TEST_F(ExternalAccountCredentialsTest,
43644359 ASSERT_TRUE (creds.ok ()) << creds.status ();
43654360 ASSERT_NE (*creds, nullptr );
43664361 EXPECT_EQ ((*creds)->min_security_level (), GRPC_PRIVACY_AND_INTEGRITY);
4367- // TODO(roth): This should return UNAUTHENTICATED.
4368- grpc_error_handle expected_error = absl::UnknownError (
4362+ grpc_error_handle expected_error = absl::UnauthenticatedError (
43694363 " error fetching oauth2 token: "
43704364 " Missing role name when retrieving signing keys." );
43714365 auto state = RequestMetadataState::NewInstance (expected_error, {});
0 commit comments