Browse code

integration-cli: remove ExecSupport check

All current versions of Docker support exec, so no need
to check for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7204341950c6c8f0a66f9bb0b082217dc0ce6ddb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/07/09 01:31:34
Showing 9 changed files
... ...
@@ -1,5 +1,3 @@
1
-// +build !test_no_exec
2
-
3 1
 package main
4 2
 
5 3
 import (
... ...
@@ -1,5 +1,3 @@
1
-// +build !test_no_exec
2
-
3 1
 package main
4 2
 
5 3
 import (
... ...
@@ -1,4 +1,4 @@
1
-// +build !windows,!test_no_exec
1
+// +build !windows
2 2
 
3 3
 package main
4 4
 
... ...
@@ -140,7 +140,7 @@ func (s *DockerSuite) TestLinksNotStartedParentNotFail(c *check.C) {
140 140
 
141 141
 func (s *DockerSuite) TestLinksHostsFilesInject(c *check.C) {
142 142
 	testRequires(c, DaemonIsLinux)
143
-	testRequires(c, testEnv.IsLocalDaemon, ExecSupport)
143
+	testRequires(c, testEnv.IsLocalDaemon)
144 144
 
145 145
 	out, _ := dockerCmd(c, "run", "-itd", "--name", "one", "busybox", "top")
146 146
 	idOne := strings.TrimSpace(out)
... ...
@@ -158,7 +158,7 @@ func (s *DockerSuite) TestLinksHostsFilesInject(c *check.C) {
158 158
 
159 159
 func (s *DockerSuite) TestLinksUpdateOnRestart(c *check.C) {
160 160
 	testRequires(c, DaemonIsLinux)
161
-	testRequires(c, testEnv.IsLocalDaemon, ExecSupport)
161
+	testRequires(c, testEnv.IsLocalDaemon)
162 162
 	dockerCmd(c, "run", "-d", "--name", "one", "busybox", "top")
163 163
 	out, _ := dockerCmd(c, "run", "-d", "--name", "two", "--link", "one:onetwo", "--link", "one:one", "busybox", "top")
164 164
 	id := strings.TrimSpace(string(out))
... ...
@@ -805,7 +805,6 @@ func (s *DockerNetworkSuite) TestDockerPluginV2NetworkDriver(c *check.C) {
805 805
 }
806 806
 
807 807
 func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *check.C) {
808
-	testRequires(c, ExecSupport)
809 808
 	// On default bridge network built-in service discovery should not happen
810 809
 	hostsFile := "/etc/hosts"
811 810
 	bridgeName := "external-bridge"
... ...
@@ -863,7 +862,7 @@ func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *
863 863
 }
864 864
 
865 865
 func (s *DockerNetworkSuite) TestDockerNetworkAnonymousEndpoint(c *check.C) {
866
-	testRequires(c, ExecSupport, NotArm)
866
+	testRequires(c, NotArm)
867 867
 	hostsFile := "/etc/hosts"
868 868
 	cstmBridgeNw := "custom-bridge-nw"
869 869
 	cstmBridgeNw1 := "custom-bridge-nw1"
... ...
@@ -3430,7 +3430,7 @@ func (s *DockerSuite) TestRunLoopbackWhenNetworkDisabled(c *check.C) {
3430 3430
 
3431 3431
 func (s *DockerSuite) TestRunModeNetContainerHostname(c *check.C) {
3432 3432
 	// Windows does not support --net=container
3433
-	testRequires(c, DaemonIsLinux, ExecSupport)
3433
+	testRequires(c, DaemonIsLinux)
3434 3434
 
3435 3435
 	dockerCmd(c, "run", "-i", "-d", "--name", "parent", "busybox", "top")
3436 3436
 	out, _ := dockerCmd(c, "exec", "parent", "cat", "/etc/hostname")
... ...
@@ -80,10 +80,6 @@ func UnixCli() bool {
80 80
 	return isUnixCli
81 81
 }
82 82
 
83
-func ExecSupport() bool {
84
-	return supportsExec
85
-}
86
-
87 83
 func Network() bool {
88 84
 	// Set a timeout on the GET at 15s
89 85
 	var timeout = time.Duration(15 * time.Second)
90 86
deleted file mode 100644
... ...
@@ -1,8 +0,0 @@
1
-// +build !test_no_exec
2
-
3
-package main
4
-
5
-const (
6
-	// indicates docker daemon tested supports 'docker exec'
7
-	supportsExec = true
8
-)
9 1
deleted file mode 100644
... ...
@@ -1,8 +0,0 @@
1
-// +build test_no_exec
2
-
3
-package main
4
-
5
-const (
6
-	// indicates docker daemon tested supports 'docker exec'
7
-	supportsExec = false
8
-)