From da7c87f9dcb8d77924556e53f9b1a33372c5ac14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Fri, 11 Dec 2015 19:59:16 +0100 Subject: [PATCH] Fix (make vet) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit server/handlers/default_test.go:353: GetCurrent passes Lock by value: handlers.failStore contains github.com/docker/notary/server/storage.MemStorage contains sync.Mutex tuf/store/httpstore_test.go:208: github.com/docker/notary/tuf/validation.ErrBadRoot composite literal uses unkeyed fields Signed-off-by: Miloslav Trmač --- server/handlers/default_test.go | 2 +- tuf/store/httpstore_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/handlers/default_test.go b/server/handlers/default_test.go index 402806d95d..031352749c 100644 --- a/server/handlers/default_test.go +++ b/server/handlers/default_test.go @@ -350,7 +350,7 @@ type failStore struct { storage.MemStorage } -func (s failStore) GetCurrent(_, _ string) ([]byte, error) { +func (s *failStore) GetCurrent(_, _ string) ([]byte, error) { return nil, fmt.Errorf("oh no! storage has failed") } diff --git a/tuf/store/httpstore_test.go b/tuf/store/httpstore_test.go index acf7b0623d..3b22c1fbd5 100644 --- a/tuf/store/httpstore_test.go +++ b/tuf/store/httpstore_test.go @@ -205,7 +205,7 @@ func Test400Error(t *testing.T) { // If it's a 400, translateStatusToError attempts to parse the body into // an error. If successful (and a recognized error) that error is returned. func TestTranslateErrorsParse400Errors(t *testing.T) { - origErr := validation.ErrBadRoot{"bad"} + origErr := validation.ErrBadRoot{Msg: "bad"} serialObj, err := validation.NewSerializableError(origErr) assert.NoError(t, err)