diff --git a/google/internal/externalaccount/sts_exchange.go b/google/internal/externalaccount/sts_exchange.go index 1bcd661..7571a0b 100644 --- a/google/internal/externalaccount/sts_exchange.go +++ b/google/internal/externalaccount/sts_exchange.go @@ -63,7 +63,6 @@ func ExchangeToken(ctx context.Context, endpoint string, request *STSTokenExchan } - return &stsResp, nil } diff --git a/google/internal/externalaccount/sts_exchange_test.go b/google/internal/externalaccount/sts_exchange_test.go index 496bba6..1cd05e7 100644 --- a/google/internal/externalaccount/sts_exchange_test.go +++ b/google/internal/externalaccount/sts_exchange_test.go @@ -81,8 +81,8 @@ func TestExchangeToken(t *testing.T) { t.Fatalf("ExchangeToken failed with error: %v", err) } - if diff := cmp.Diff(expectedToken, *resp); diff != "" { - t.Errorf("mismatched messages received by mock server (-want +got): \n%v", diff) + if expectedToken != *resp { + t.Errorf("mismatched messages received by mock server. \nWant: \n%v\n\nGot:\n%v", expectedToken, *resp) } }