diff --git a/fs/store_test.go b/fs/store_test.go index 5d7fa0d0d8..ceefc5e133 100644 --- a/fs/store_test.go +++ b/fs/store_test.go @@ -1,7 +1,6 @@ package fs import ( - "errors" "fmt" "github.com/dotcloud/docker/fake" "github.com/dotcloud/docker/future" @@ -261,7 +260,7 @@ func healthCheck(store *Store) error { for _, img := range images { // Check for duplicate IDs per path if _, exists := IDs[img.Id]; exists { - return errors.New(fmt.Sprintf("Duplicate ID: %s", img.Id)) + return fmt.Errorf("Duplicate ID: %s", img.Id) } else { IDs[img.Id] = true } @@ -274,7 +273,7 @@ func healthCheck(store *Store) error { // Check non-existing parents for parent := range parents { if _, exists := parents[parent]; !exists { - return errors.New("Reference to non-registered parent: " + parent) + return fmt.Errorf("Reference to non-registered parent: %s", parent) } } return nil diff --git a/mount_test.go b/mount_test.go index 98354875ee..f5bd9e09e7 100644 --- a/mount_test.go +++ b/mount_test.go @@ -1,6 +1,7 @@ package docker import ( + "fmt" "github.com/dotcloud/docker/fake" "github.com/dotcloud/docker/fs" "io/ioutil" @@ -9,7 +10,7 @@ import ( ) // Look for inconsistencies in a store. -func healthCheck(store *Store) error { +func healthCheck(store *fs.Store) error { parents := make(map[string]bool) paths, err := store.Paths() if err != nil { @@ -24,7 +25,7 @@ func healthCheck(store *Store) error { for _, img := range images { // Check for duplicate IDs per path if _, exists := IDs[img.Id]; exists { - return errors.New(fmt.Sprintf("Duplicate ID: %s", img.Id)) + return fmt.Errorf("Duplicate ID: %s", img.Id) } else { IDs[img.Id] = true } @@ -37,7 +38,7 @@ func healthCheck(store *Store) error { // Check non-existing parents for parent := range parents { if _, exists := parents[parent]; !exists { - return errors.New("Reference to non-registered parent: " + parent) + return fmt.Errorf("Reference to non-registered parent: %s", parent) } } return nil