Add ImageFsInfo support

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-09-18 07:52:33 +00:00
parent b85be3d0cd
commit 491400c892
13 changed files with 507 additions and 7 deletions

View File

@@ -92,8 +92,8 @@ func (s *Store) List() []Image {
s.lock.RLock()
defer s.lock.RUnlock()
var images []Image
for _, sb := range s.images {
images = append(images, sb)
for _, i := range s.images {
images = append(images, i)
}
return images
}

View File

@@ -99,7 +99,7 @@ func TestImageStore(t *testing.T) {
imgs = s.List()
assert.Len(imgs, 2)
t.Logf("get should return nil after deletion")
t.Logf("get should return empty struct and ErrNotExist after deletion")
img, err := s.Get(testID)
assert.Equal(Image{}, img)
assert.Equal(store.ErrNotExist, err)