@@ -16,8 +16,6 @@ import (
1616 "github.com/moby/moby/api/types"
1717 "github.com/moby/moby/api/types/container"
1818 "github.com/moby/moby/client"
19- "github.com/moby/moby/client/pkg/progress"
20- "github.com/moby/moby/client/pkg/streamformatter"
2119 "github.com/spf13/pflag"
2220 "gotest.tools/v3/assert"
2321 is "gotest.tools/v3/assert/cmp"
@@ -129,7 +127,7 @@ func TestRunAttach(t *testing.T) {
129127 }
130128
131129 // end stream from "container" so that we'll detach
132- conn .Close ()
130+ assert . NilError ( t , conn .Close () )
133131
134132 select {
135133 case cmdErr := <- cmdErrC :
@@ -209,7 +207,7 @@ func TestRunAttachTermination(t *testing.T) {
209207 }
210208
211209 assert .NilError (t , syscall .Kill (syscall .Getpid (), syscall .SIGTERM ))
212- conn .Close ()
210+ assert . NilError ( t , conn .Close () )
213211
214212 select {
215213 case <- killCh :
@@ -245,20 +243,12 @@ func TestRunPullTermination(t *testing.T) {
245243 _ = server .Close ()
246244 })
247245 go func () {
248- id := test .RandomID ()[:12 ] // short-ID
249- progressOutput := streamformatter .NewJSONProgressOutput (server , true )
250- for i := range 100 {
246+ for range 100 {
251247 select {
252248 case <- ctx .Done ():
253249 assert .NilError (t , server .Close (), "failed to close imageCreateFunc server" )
254250 return
255251 default :
256- assert .NilError (t , progressOutput .WriteProgress (progress.Progress {
257- ID : id ,
258- Message : "Downloading" ,
259- Current : int64 (i ),
260- Total : 100 ,
261- }))
262252 time .Sleep (100 * time .Millisecond )
263253 }
264254 }
0 commit comments