forked from Mirrors/oauth2
google: fix warnings from go vet
go vet reports the following warnings: google/jwt_test.go:85: missing argument for Fatalf("%q"): format reads arg 2, have only 1 args google/sdk_test.go:28: wrong number of args for format in Errorf call: 1 needed but 2 args Change-Id: If5acfae42b558ced7694dd7bc6f12ab4a3cb6115 Reviewed-on: https://go-review.googlesource.com/24992 Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
This commit is contained in:
parent
08c8d727d2
commit
12e1e98615
|
@ -82,7 +82,7 @@ func TestJWTAccessTokenSourceFromJSON(t *testing.T) {
|
|||
}
|
||||
var hdr jws.Header
|
||||
if err := json.Unmarshal([]byte(hdrJSON), &hdr); err != nil {
|
||||
t.Fatalf("json.Unmarshal: %v (%q)", err)
|
||||
t.Fatalf("json.Unmarshal: %v (%q)", err, hdrJSON)
|
||||
}
|
||||
|
||||
if got, want := hdr.KeyID, "268f54e43a1af97cfc71731688434f45aca15c8b"; got != want {
|
||||
|
|
|
@ -25,9 +25,9 @@ func TestSDKConfig(t *testing.T) {
|
|||
c, err := NewSDKConfig(tt.account)
|
||||
if got, want := err != nil, tt.err; got != want {
|
||||
if !tt.err {
|
||||
t.Errorf("expected no error, got error: %v", tt.err, err)
|
||||
t.Errorf("got %v, want nil", err)
|
||||
} else {
|
||||
t.Errorf("expected error, got none")
|
||||
t.Errorf("got nil, want error")
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
@ -36,11 +36,11 @@ func TestSDKConfig(t *testing.T) {
|
|||
}
|
||||
tok := c.initialToken
|
||||
if tok == nil {
|
||||
t.Errorf("expected token %q, got: nil", tt.accessToken)
|
||||
t.Errorf("got nil, want %q", tt.accessToken)
|
||||
continue
|
||||
}
|
||||
if tok.AccessToken != tt.accessToken {
|
||||
t.Errorf("expected token %q, got: %q", tt.accessToken, tok.AccessToken)
|
||||
t.Errorf("got %q, want %q", tok.AccessToken, tt.accessToken)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue