@@ -76,9 +76,9 @@ func (m *apiMock) ContainerCreate(
7676 networking * network.NetworkingConfig ,
7777 platform * specs.Platform ,
7878 containerName string ,
79- ) (container.ContainerCreateCreatedBody , error ) {
79+ ) (container.CreateResponse , error ) {
8080 args := m .Called (ctx , config , host , networking , platform , containerName )
81- return args .Get (0 ).(container.ContainerCreateCreatedBody ), args .Error (1 )
81+ return args .Get (0 ).(container.CreateResponse ), args .Error (1 )
8282}
8383
8484func (m * apiMock ) ContainerStart (
@@ -94,9 +94,9 @@ func (m *apiMock) ContainerWait(
9494 ctx context.Context ,
9595 containerID string ,
9696 condition container.WaitCondition ,
97- ) (<- chan container.ContainerWaitOKBody , <- chan error ) {
97+ ) (<- chan container.WaitResponse , <- chan error ) {
9898 args := m .Called (ctx , containerID , condition )
99- return args .Get (0 ).(chan container.ContainerWaitOKBody ), args .Get (1 ).(chan error )
99+ return args .Get (0 ).(chan container.WaitResponse ), args .Get (1 ).(chan error )
100100}
101101
102102type dockerClientSuite struct {
@@ -200,11 +200,11 @@ func (s *dockerClientSuite) TestFindImage_failure() {
200200func (s * dockerClientSuite ) prepareFs (inContainer bool , cidFileContent string ) func () {
201201 fs := afero .NewMemMapFs ()
202202 if inContainer {
203- err := afero .WriteFile (fs , "/.dockerenv" , nil , 0644 )
203+ err := afero .WriteFile (fs , "/.dockerenv" , nil , 0o644 )
204204 s .Require ().NoError (err )
205205
206206 if cidFileContent != "" {
207- err = afero .WriteFile (fs , "/container.id" , []byte (cidFileContent ), 0644 )
207+ err = afero .WriteFile (fs , "/container.id" , []byte (cidFileContent ), 0o644 )
208208 s .Require ().NoError (err )
209209 }
210210 }
@@ -529,7 +529,7 @@ search:
529529 var pltf * specs.Platform // nil!
530530
531531 s .cli .On ("ContainerCreate" , bg , ccfg , hcfg , ncfg , pltf , "" ).
532- Return (container.ContainerCreateCreatedBody {ID : runningID }, startErr )
532+ Return (container.CreateResponse {ID : runningID }, startErr )
533533}
534534
535535func (s * dockerClientSuite ) TestPrepareContainer () {
@@ -572,8 +572,8 @@ func (s *dockerClientSuite) TestRun() {
572572 s .cli .On ("ContainerStart" , bg , runningID , types.ContainerStartOptions {}).
573573 Return (nil )
574574
575- statusCh := make (chan container.ContainerWaitOKBody , 1 )
576- statusCh <- container.ContainerWaitOKBody {StatusCode : 0 }
575+ statusCh := make (chan container.WaitResponse , 1 )
576+ statusCh <- container.WaitResponse {StatusCode : 0 }
577577 errCh := make (chan error , 1 )
578578 s .cli .On ("ContainerWait" , bg , runningID , container .WaitConditionNotRunning ).
579579 Return (statusCh , errCh )
@@ -605,8 +605,8 @@ func (s *dockerClientSuite) TestRun_errRetreiveLogs() {
605605 s .cli .On ("ContainerStart" , bg , runningID , types.ContainerStartOptions {}).
606606 Return (nil )
607607
608- statusCh := make (chan container.ContainerWaitOKBody , 1 )
609- statusCh <- container.ContainerWaitOKBody {StatusCode : 0 }
608+ statusCh := make (chan container.WaitResponse , 1 )
609+ statusCh <- container.WaitResponse {StatusCode : 0 }
610610 errCh := make (chan error )
611611 s .cli .On ("ContainerWait" , bg , runningID , container .WaitConditionNotRunning ).
612612 Return (statusCh , errCh )
@@ -634,8 +634,8 @@ func (s *dockerClientSuite) TestRun_errReadLogs() {
634634 s .cli .On ("ContainerStart" , bg , runningID , types.ContainerStartOptions {}).
635635 Return (nil )
636636
637- statusCh := make (chan container.ContainerWaitOKBody , 1 )
638- statusCh <- container.ContainerWaitOKBody {StatusCode : 0 }
637+ statusCh := make (chan container.WaitResponse , 1 )
638+ statusCh <- container.WaitResponse {StatusCode : 0 }
639639 errCh := make (chan error )
640640 s .cli .On ("ContainerWait" , bg , runningID , container .WaitConditionNotRunning ).
641641 Return (statusCh , errCh )
@@ -673,7 +673,7 @@ func (s *dockerClientSuite) TestRun_errWaitForContainer() {
673673 s .cli .On ("ContainerStart" , bg , runningID , types.ContainerStartOptions {}).
674674 Return (nil )
675675
676- statusCh := make (chan container.ContainerWaitOKBody )
676+ statusCh := make (chan container.WaitResponse )
677677 errCh := make (chan error , 1 )
678678 errCh <- errors .New ("unexpected restart" )
679679 s .cli .On ("ContainerWait" , bg , runningID , container .WaitConditionNotRunning ).
@@ -696,8 +696,8 @@ func (s *dockerClientSuite) TestRun_errExitStatus() {
696696 s .cli .On ("ContainerStart" , bg , runningID , types.ContainerStartOptions {}).
697697 Return (nil )
698698
699- statusCh := make (chan container.ContainerWaitOKBody , 1 )
700- statusCh <- container.ContainerWaitOKBody {StatusCode : 127 }
699+ statusCh := make (chan container.WaitResponse , 1 )
700+ statusCh <- container.WaitResponse {StatusCode : 127 }
701701 errCh := make (chan error , 1 )
702702 s .cli .On ("ContainerWait" , bg , runningID , container .WaitConditionNotRunning ).
703703 Return (statusCh , errCh )
0 commit comments