Skip to content

Commit

Permalink
address nits
Browse files Browse the repository at this point in the history
  • Loading branch information
BigTailWolf committed Mar 11, 2024
1 parent eeb1a08 commit a95c923
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions google/externalaccount/basecredentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func TestToken(t *testing.T) {
Scopes: []string{"https://www.googleapis.com/auth/devstorage.full_control"},
}

responseBody, _ := json.Marshal(testCase.responseBody)
responseBody, err := json.Marshal(testCase.responseBody)
if err != nil {
t.Errorf("Invalid response received.")
}

server := testExchangeTokenServer{
url: "/",
Expand All @@ -254,10 +257,8 @@ func TestToken(t *testing.T) {

tok, err := run(t, &config, &server)

if err != nil {
if err.Error() != testCase.expectErrorMsg {
t.Errorf("Error actual = %v, and Expect = %v", err, testCase.expectErrorMsg)
}
if err != nil && err.Error() != testCase.expectErrorMsg {
t.Errorf("Error not as expected: got = %v, and want = %v", err, testCase.expectErrorMsg)
}
validateToken(t, tok, testCase.expectToken)
}
Expand Down

0 comments on commit a95c923

Please sign in to comment.