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:
Sean Rees 2016-07-18 19:05:36 +01:00 committed by Jaana Burcu Dogan
parent 08c8d727d2
commit 12e1e98615
2 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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)
}
}
}