Skip to content

Commit caff00a

Browse files
authored
Merge pull request #39 from rockspore/create-pull-request/patch-797909f
Automated fix for refs/heads/alts-token-fetcher
2 parents 797909f + 058eea1 commit caff00a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/core/tsi/alts/handshaker/alts_handshaker_client.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ static grpc_byte_buffer* get_serialized_start_client(
545545
absl::StatusOr<std::string> token = token_fetcher->GetToken();
546546
if (!token.ok()) {
547547
LOG(ERROR) << "Failed to get token from the token fetcher "
548-
"in client start handshake: "
549-
<< token.status();
548+
"in client start handshake: "
549+
<< token.status();
550550
return nullptr;
551551
}
552552
access_token = *std::move(token);

test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,16 @@ void DestroyConfig(alts_handshaker_client_test_config* config) {
455455

456456
class FakeTokenFetcher : public grpc::alts::TokenFetcher {
457457
public:
458-
FakeTokenFetcher(bool has_error = false) : has_error_(has_error) {}
458+
explicit FakeTokenFetcher(bool has_error = false) : has_error_(has_error) {}
459459
~FakeTokenFetcher() override = default;
460460

461-
absl::StatusOr<std::string> GetToken() override {
461+
absl::StatusOr<std::string> GetToken() override {
462462
if (has_error_) {
463463
return absl::InternalError("failed to get a token");
464464
}
465465
return kFakeToken;
466466
}
467+
467468
private:
468469
bool has_error_;
469470
};
@@ -675,7 +676,7 @@ static void tsi_cb_assert_tsi_internal_error(
675676

676677
TEST(AltsHandshakerClientTest, ScheduleRequestWithTokenFailureTest) {
677678
// Initialization.
678-
std::shared_ptr<FakeTokenFetcher> token_fetcher =
679+
std::shared_ptr<FakeTokenFetcher> token_fetcher =
679680
std::make_shared<FakeTokenFetcher>(/*has_error=*/true);
680681
alts_handshaker_client_test_config* config = CreateConfig(token_fetcher);
681682
// Check client_start failure.

0 commit comments

Comments
 (0)