@@ -36,6 +36,7 @@ import (
3636 "github.com/google/go-containerregistry/pkg/name"
3737 "github.com/google/go-containerregistry/pkg/v1/random"
3838 "github.com/google/go-containerregistry/pkg/v1/tarball"
39+ dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
3940 "github.com/opencontainers/go-digest"
4041 v1 "github.com/opencontainers/image-spec/specs-go/v1"
4142)
@@ -158,6 +159,12 @@ func (f *FakeAPIClient) ImageRemove(_ context.Context, _ string, _ image.RemoveO
158159 return []image.DeleteResponse {}, nil
159160}
160161
162+ func (fd * FakeAPIClient ) ImageInspect (ctx context.Context , _ string , opts ... client.ImageInspectOption ) (image.InspectResponse , error ) {
163+ return image.InspectResponse {
164+ Config : & dockerspec.DockerOCIImageConfig {},
165+ }, nil
166+ }
167+
161168func (f * FakeAPIClient ) ImageInspectWithRaw (_ context.Context , refOrID string ) (types.ImageInspect , []byte , error ) {
162169 if f .ErrImageInspect {
163170 return types.ImageInspect {}, nil , fmt .Errorf ("" )
@@ -258,17 +265,17 @@ func (f *FakeAPIClient) Info(context.Context) (system.Info, error) {
258265 }, nil
259266}
260267
261- func (f * FakeAPIClient ) ImageLoad (ctx context.Context , input io.Reader , quiet bool ) (types. ImageLoadResponse , error ) {
268+ func (f * FakeAPIClient ) ImageLoad (ctx context.Context , input io.Reader , _ ... client. ImageLoadOption ) (image. LoadResponse , error ) {
262269 ref , err := ReadRefFromFakeTar (input )
263270 if err != nil {
264- return types. ImageLoadResponse {}, fmt .Errorf ("reading tar" )
271+ return image. LoadResponse {}, fmt .Errorf ("reading tar" )
265272 }
266273
267274 next := atomic .AddInt32 (& f .nextImageID , 1 )
268275 imageID := fmt .Sprintf ("sha256:%d" , next )
269276 f .Add (ref , imageID )
270277
271- return types. ImageLoadResponse {
278+ return image. LoadResponse {
272279 Body : f .body (imageID ),
273280 }, nil
274281}
@@ -289,7 +296,7 @@ func (f *FakeAPIClient) ImageList(ctx context.Context, ops image.ListOptions) ([
289296 return rt , nil
290297}
291298
292- func (f * FakeAPIClient ) ImageHistory (ctx context.Context , image string ) ([]image.HistoryResponseItem , error ) {
299+ func (f * FakeAPIClient ) ImageHistory (ctx context.Context , image string , _ ... client. ImageHistoryOption ) ([]image.HistoryResponseItem , error ) {
293300 return nil , nil
294301}
295302
0 commit comments