File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828 "github.com/google/go-containerregistry/internal/compare"
2929 "github.com/google/go-containerregistry/pkg/name"
3030 "github.com/google/go-containerregistry/pkg/v1/tarball"
31+ "github.com/google/go-containerregistry/pkg/v1/validate"
3132)
3233
3334var imagePath = "../tarball/testdata/test_image_1.tar"
@@ -128,6 +129,15 @@ func TestImage(t *testing.T) {
128129 t .Errorf ("wanted %s to contain %s" , err .Error (), tc .wantErr )
129130 }
130131 }
132+
133+ err = validate .Image (dmn )
134+ if err != nil {
135+ if tc .wantErr == "" {
136+ t .Errorf ("validate.Image: %v" , err )
137+ } else if ! strings .Contains (err .Error (), tc .wantErr ) {
138+ t .Errorf ("wanted %s to contain %s" , err .Error (), tc .wantErr )
139+ }
140+ }
131141 }
132142
133143 tc .buffered = true
You can’t perform that action at this time.
0 commit comments