@@ -50,30 +50,31 @@ type NonWinCIE2eSuite struct {
5050
5151func (s * NonWinCIE2eSuite ) TestKillChildOnCancel () {
5252 It ("should kill docker-classic if parent command is cancelled" , func () {
53+ imageName := "test-sleep-image"
5354 out := s .ListProcessesCommand ().ExecOrDie ()
54- Expect (out ).NotTo (ContainSubstring ("docker-classic" ))
55+ Expect (out ).NotTo (ContainSubstring (imageName ))
5556
5657 dir := s .ConfigDir
5758 Expect (ioutil .WriteFile (filepath .Join (dir , "Dockerfile" ), []byte (`FROM alpine:3.10
5859RUN sleep 100` ), 0644 )).To (Succeed ())
5960 shutdown := make (chan time.Time )
6061 errs := make (chan error )
61- ctx := s .NewDockerCommand ("build" , "--no-cache" , "-t" , "test-sleep-image" , "." ).WithinDirectory (dir ).WithTimeout (shutdown )
62+ ctx := s .NewDockerCommand ("build" , "--no-cache" , "-t" , imageName , "." ).WithinDirectory (dir ).WithTimeout (shutdown )
6263 go func () {
6364 _ , err := ctx .Exec ()
6465 errs <- err
6566 }()
6667 err := WaitFor (time .Second , 10 * time .Second , errs , func () bool {
6768 out := s .ListProcessesCommand ().ExecOrDie ()
68- return strings .Contains (out , "docker-classic" )
69+ return strings .Contains (out , imageName )
6970 })
7071 Expect (err ).NotTo (HaveOccurred ())
7172 log .Println ("Killing docker process" )
7273
7374 close (shutdown )
7475 err = WaitFor (time .Second , 12 * time .Second , nil , func () bool {
7576 out := s .ListProcessesCommand ().ExecOrDie ()
76- return ! strings .Contains (out , "docker-classic" )
77+ return ! strings .Contains (out , imageName )
7778 })
7879 Expect (err ).NotTo (HaveOccurred ())
7980 })
@@ -108,7 +109,7 @@ func (s *NonWinCIE2eSuite) getGrpcServerAndCLientAddress() (string, string) {
108109 return socketName , socketName
109110}
110111
111- func TestE2e (t * testing.T ) {
112+ func TestNonWinCIE2 (t * testing.T ) {
112113 suite .Run (t , new (NonWinCIE2eSuite ))
113114}
114115
0 commit comments