adds oci image spec to image info placed into imagestore

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2017-12-12 15:08:01 -06:00
parent 03ac989644
commit 31223fd5b1
13 changed files with 56 additions and 76 deletions

View File

@@ -40,8 +40,9 @@ type Image struct {
ChainID string
// Size is the compressed size of the image.
Size int64
// Config is the oci image config of the image.
Config *imagespec.ImageConfig
// ImageSpec is the oci image structure which describes basic information about the image.
ImageSpec imagespec.Image
// Containerd image reference
Image containerd.Image
}

View File

@@ -20,7 +20,6 @@ import (
"strings"
"testing"
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
assertlib "github.com/stretchr/testify/assert"
"github.com/kubernetes-incubator/cri-containerd/pkg/store"
@@ -34,7 +33,6 @@ func TestImageStore(t *testing.T) {
RepoTags: []string{"tag-1"},
RepoDigests: []string{"digest-1"},
Size: 10,
Config: &imagespec.ImageConfig{},
},
{
ID: "sha256:2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
@@ -42,7 +40,6 @@ func TestImageStore(t *testing.T) {
RepoTags: []string{"tag-2abcd"},
RepoDigests: []string{"digest-2abcd"},
Size: 20,
Config: &imagespec.ImageConfig{},
},
{
ID: "sha256:3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
@@ -50,7 +47,6 @@ func TestImageStore(t *testing.T) {
RepoDigests: []string{"digest-4a333"},
ChainID: "test-chain-id-4a333",
Size: 30,
Config: &imagespec.ImageConfig{},
},
{
ID: "sha256:4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
@@ -58,7 +54,6 @@ func TestImageStore(t *testing.T) {
RepoDigests: []string{"digest-4abcd"},
ChainID: "test-chain-id-4abcd",
Size: 40,
Config: &imagespec.ImageConfig{},
},
}
assert := assertlib.New(t)