@@ -40,7 +40,7 @@ func (s *DockerSuite) TestCliExecBasic(c *check.C) {
4040 testRequires(c, DaemonIsLinux)
4141 dockerCmd(c, "run", "-d", "--name", "test", "busybox", "sh", "-c", "echo test > /tmp/file && top")
4242
43- execCmd := exec.Command(dockerBinary, "--host ="+os.Getenv("DOCKER_HOST"), "exec", "-i", "test", "sh")
43+ execCmd := exec.Command(dockerBinary, "--region ="+os.Getenv("DOCKER_HOST"), "exec", "-i", "test", "sh")
4444 stdin, err := execCmd.StdinPipe()
4545 c.Assert(err, checker.IsNil)
4646 stdout, err := execCmd.StdoutPipe()
@@ -113,7 +113,7 @@ func (s *DockerSuite) TestCliExecExitStatus(c *check.C) {
113113 runSleepingContainer (c , "-d" , "--name" , "top" )
114114
115115 // Test normal (non-detached) case first
116- cmd := exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "exec" , "top" , "sh" , "-c" , "exit 23" )
116+ cmd := exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "exec" , "top" , "sh" , "-c" , "exit 23" )
117117 ec , _ := runCommand (cmd )
118118 c .Assert (ec , checker .Equals , 23 )
119119}
@@ -127,7 +127,7 @@ func (s *DockerSuite) TestCliExecExitStatus(c *check.C) {
127127 testRequires(c, DaemonIsLinux)
128128 dockerCmd(c, "run", "-d", "-it", "--name", "test", "busybox")
129129
130- cmd := exec.Command(dockerBinary, "--host ="+os.Getenv("DOCKER_HOST"), "exec", "-i", "test", "cat")
130+ cmd := exec.Command(dockerBinary, "--region ="+os.Getenv("DOCKER_HOST"), "exec", "-i", "test", "cat")
131131 stdinRw, err := cmd.StdinPipe()
132132 c.Assert(err, checker.IsNil)
133133
@@ -158,7 +158,7 @@ func (s *DockerSuite) TestCliExecTTYWithoutStdin(c *check.C) {
158158 go func () {
159159 defer close (errChan )
160160
161- cmd := exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "exec" , "-ti" , id , "true" )
161+ cmd := exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "exec" , "-ti" , id , "true" )
162162 if _ , err := cmd .StdinPipe (); err != nil {
163163 errChan <- err
164164 return
@@ -192,7 +192,7 @@ func (s *DockerSuite) TestCliExecParseError(c *check.C) {
192192 dockerCmd (c , "run" , "-d" , "--name" , "top" , "busybox" , "top" )
193193
194194 // Test normal (non-detached) case first
195- cmd := exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "exec" , "top" )
195+ cmd := exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "exec" , "top" )
196196 _ , stderr , _ , err := runCommandWithStdoutStderr (cmd )
197197 c .Assert (err , checker .NotNil )
198198 c .Assert (stderr , checker .Contains , "See '" + dockerBinary + " exec --help'" )
@@ -207,7 +207,7 @@ func (s *DockerSuite) TestCliExecStopNotHanging(c *check.C) {
207207 testRequires (c , DaemonIsLinux )
208208 dockerCmd (c , "run" , "-d" , "--name" , "test" , "busybox" , "top" )
209209
210- err := exec .Command (dockerBinary , "exec" , "--host =" + os .Getenv ("DOCKER_HOST" ), "test" , "top" ).Start ()
210+ err := exec .Command (dockerBinary , "exec" , "--region =" + os .Getenv ("DOCKER_HOST" ), "test" , "top" ).Start ()
211211 c .Assert (err , checker .IsNil )
212212
213213 type dstop struct {
@@ -217,7 +217,7 @@ func (s *DockerSuite) TestCliExecStopNotHanging(c *check.C) {
217217
218218 ch := make (chan dstop )
219219 go func () {
220- out , err := exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "stop" , "test" ).CombinedOutput ()
220+ out , err := exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "stop" , "test" ).CombinedOutput ()
221221 ch <- dstop {out , err }
222222 close (ch )
223223 }()
@@ -369,7 +369,7 @@ func (s *DockerSuite) TestCliExecRunMutableNetworkFiles(c *check.C) {
369369 for _ , fn := range []string {"resolv.conf" , "hosts" } {
370370 deleteAllContainers ()
371371
372- content , err := runCommandAndReadContainerFile (fn , exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "run" , "-d" , "--name" , "c1" , "busybox" , "sh" , "-c" , fmt .Sprintf ("echo success >/etc/%s && top" , fn )))
372+ content , err := runCommandAndReadContainerFile (fn , exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "run" , "-d" , "--name" , "c1" , "busybox" , "sh" , "-c" , fmt .Sprintf ("echo success >/etc/%s && top" , fn )))
373373 c .Assert (err , checker .IsNil )
374374
375375 c .Assert (strings .TrimSpace (string (content )), checker .Equals , "success" , check .Commentf ("Content was not what was modified in the container" , string (content )))
@@ -430,7 +430,7 @@ func (s *DockerSuite) TestCliExecInspectID(c *check.C) {
430430 c .Assert (out , checker .Equals , "[]" , check .Commentf ("ExecIDs should be empty, got: %s" , out ))
431431
432432 // Start an exec, have it block waiting so we can do some checking
433- cmd := exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "exec" , id , "sh" , "-c" ,
433+ cmd := exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "exec" , id , "sh" , "-c" ,
434434 "while ! test -e /execid1; do sleep 1; done" )
435435
436436 err := cmd .Start ()
@@ -454,7 +454,7 @@ func (s *DockerSuite) TestCliExecInspectID(c *check.C) {
454454 c .Assert (err , checker .IsNil , check .Commentf ("failed to get the exec id" ))
455455
456456 // End the exec by creating the missing file
457- err = exec .Command (dockerBinary , "--host =" + os .Getenv ("DOCKER_HOST" ), "exec" , id ,
457+ err = exec .Command (dockerBinary , "--region =" + os .Getenv ("DOCKER_HOST" ), "exec" , id ,
458458 "sh" , "-c" , "touch /execid1" ).Run ()
459459
460460 c .Assert (err , checker .IsNil , check .Commentf ("failed to run the 2nd exec cmd" ))
0 commit comments