77 "testing"
88
99 "github.com/docker/docker/api/types"
10+ "github.com/docker/docker/api/types/build"
1011 "github.com/docker/docker/api/types/container"
11- "github.com/docker/docker/api/types/image"
12+ typesImage "github.com/docker/docker/api/types/image"
1213 "github.com/docker/docker/api/types/network"
1314 "github.com/docker/docker/errdefs"
1415 ocispec "github.com/opencontainers/image-spec/specs-go/v1"
@@ -211,8 +212,8 @@ func Test_BuildEnvs(t *testing.T) {
211212
212213func TestBuildFail (t * testing.T ) {
213214 cli := mockDocker {
214- inspect : func (ctx context.Context , image string ) (types. ImageInspect , []byte , error ) {
215- return types. ImageInspect {}, nil , errors .New ("this is expected" )
215+ inspect : func (ctx context.Context , image string ) (typesImage. InspectResponse , []byte , error ) {
216+ return typesImage. InspectResponse {}, nil , errors .New ("this is expected" )
216217 },
217218 }
218219 b := s2i .NewBuilder (s2i .WithDockerClient (cli ))
@@ -232,34 +233,34 @@ func (i *mockImpl) Build(cfg *api.Config) (*api.Result, error) {
232233}
233234
234235type mockDocker struct {
235- inspect func (ctx context.Context , image string ) (types. ImageInspect , []byte , error )
236+ inspect func (ctx context.Context , image string ) (typesImage. InspectResponse , []byte , error )
236237}
237238
238- func (m mockDocker ) ImageInspectWithRaw (ctx context.Context , image string ) (types. ImageInspect , []byte , error ) {
239+ func (m mockDocker ) ImageInspectWithRaw (ctx context.Context , image string ) (typesImage. InspectResponse , []byte , error ) {
239240 if m .inspect != nil {
240241 return m .inspect (ctx , image )
241242 }
242243
243- return types. ImageInspect {}, nil , nil
244+ return typesImage. InspectResponse {}, nil , nil
244245}
245246
246- func (m mockDocker ) ImageBuild (ctx context.Context , context io.Reader , options types .ImageBuildOptions ) (types .ImageBuildResponse , error ) {
247+ func (m mockDocker ) ImageBuild (ctx context.Context , context io.Reader , options build .ImageBuildOptions ) (build .ImageBuildResponse , error ) {
247248 panic ("implement me" )
248249}
249250
250251func (m mockDocker ) ContainerAttach (ctx context.Context , container string , options container.AttachOptions ) (types.HijackedResponse , error ) {
251252 panic ("implement me" )
252253}
253254
254- func (m mockDocker ) ContainerCommit (ctx context.Context , container string , options container.CommitOptions ) (types. IDResponse , error ) {
255+ func (m mockDocker ) ContainerCommit (ctx context.Context , container string , options container.CommitOptions ) (container. CommitResponse , error ) {
255256 panic ("implement me" )
256257}
257258
258259func (m mockDocker ) ContainerCreate (ctx context.Context , config * container.Config , hostConfig * container.HostConfig , networkingConfig * network.NetworkingConfig , platform * ocispec.Platform , containerName string ) (container.CreateResponse , error ) {
259260 panic ("implement me" )
260261}
261262
262- func (m mockDocker ) ContainerInspect (ctx context.Context , container string ) (types. ContainerJSON , error ) {
263+ func (m mockDocker ) ContainerInspect (ctx context.Context , container string ) (container. InspectResponse , error ) {
263264 panic ("implement me" )
264265}
265266
@@ -287,16 +288,15 @@ func (m mockDocker) CopyFromContainer(ctx context.Context, container, srcPath st
287288 panic ("implement me" )
288289}
289290
290- func (m mockDocker ) ImagePull (ctx context.Context , ref string , options image .PullOptions ) (io.ReadCloser , error ) {
291+ func (m mockDocker ) ImagePull (ctx context.Context , ref string , options typesImage .PullOptions ) (io.ReadCloser , error ) {
291292 panic ("implement me" )
292293}
293294
294- func (m mockDocker ) ImageRemove (ctx context.Context , image string , options image .RemoveOptions ) ([]image .DeleteResponse , error ) {
295+ func (m mockDocker ) ImageRemove (ctx context.Context , image string , options typesImage .RemoveOptions ) ([]typesImage .DeleteResponse , error ) {
295296 panic ("implement me" )
296297}
297298
298299func (m mockDocker ) ServerVersion (ctx context.Context ) (types.Version , error ) {
299-
300300 panic ("implement me" )
301301}
302302
0 commit comments