Skip to content

Commit

Permalink
Fixes from gometalinter
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Nov 2, 2018
1 parent e3cb1a1 commit 9a40969
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
14 changes: 2 additions & 12 deletions crypto/opts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,10 @@ func TestPassPhrase(t *testing.T) {
}

passphrase2, err := test.opts.GetPassphrase(test.passReader)
if assert.NoError(err) {
if !assert.NoError(err) {
continue
}

if !assert.Equal(test.passphrase, passphrase2) {
continue
}
assert.Equal(test.passphrase, passphrase2)
}
}

func TestStdinPassReader(t *testing.T) {
assert := assert.New(t)
passReader := crypto.StdinPassReader
assert.NotNil(passReader)

go passReader()
}
5 changes: 4 additions & 1 deletion distribution/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ func blobTest(
}

if !equal {
showContents(t, filename, deconvpath)
err = showContents(t, filename, deconvpath)
if err != nil {
t.Error(err)
}
return
}

Expand Down
2 changes: 1 addition & 1 deletion registry/httpclient/httpclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestHTTPClient(t *testing.T) {

server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
assert.Equal(req.URL.String(), "/")
rw.Write([]byte(`OK`))
_, _ = rw.Write([]byte(`OK`))
}))
defer server.Close()

Expand Down

0 comments on commit 9a40969

Please sign in to comment.