Merge pull request #39469 from thaJeztah/remove_default_sleep_image

integration-cli: remove defaultSleepImage constant
This commit is contained in:
Yong Tang 2019-07-10 07:29:08 -07:00 committed by GitHub
commit 026fae5d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 12 deletions

View File

@ -28,7 +28,7 @@ func (s *DockerSuite) BenchmarkConcurrentContainerActions(c *check.C) {
go func() {
defer innerGroup.Done()
for i := 0; i < numIterations; i++ {
args := []string{"run", "-d", defaultSleepImage}
args := []string{"run", "-d", "busybox"}
args = append(args, sleepCommandForDaemonPlatform()...)
out, _, err := dockerCmdWithError(args...)
if err != nil {

View File

@ -14,11 +14,11 @@ func (s *DockerSwarmSuite) TestServiceScale(c *check.C) {
d := s.AddDaemon(c, true, true)
service1Name := "TestService1"
service1Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service1Name, defaultSleepImage}, sleepCommandForDaemonPlatform()...)
service1Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service1Name, "busybox"}, sleepCommandForDaemonPlatform()...)
// global mode
service2Name := "TestService2"
service2Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service2Name, "--mode=global", defaultSleepImage}, sleepCommandForDaemonPlatform()...)
service2Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service2Name, "--mode=global", "busybox"}, sleepCommandForDaemonPlatform()...)
// Create services
_, err := d.Cmd(service1Args...)

View File

@ -347,7 +347,7 @@ func getInspectBody(c *check.C, version, id string) []byte {
// Run a long running idle task in a background container using the
// system-specific default image and command.
func runSleepingContainer(c *check.C, extraArgs ...string) string {
return runSleepingContainerInImage(c, defaultSleepImage, extraArgs...)
return runSleepingContainerInImage(c, "busybox", extraArgs...)
}
// Run a long running idle task in a background container using the specified

View File

@ -7,8 +7,4 @@ const (
isUnixCli = true
expectedFileChmod = "-rw-r--r--"
// On Unix variants, the busybox image comes with the `top` command which
// runs indefinitely while still being interruptible by a signal.
defaultSleepImage = "busybox"
)

View File

@ -8,8 +8,4 @@ const (
// this is the expected file permission set on windows: gh#11395
expectedFileChmod = "-rwxr-xr-x"
// On Windows, the busybox image doesn't have the `top` command, so we rely
// on `sleep` with a high duration.
defaultSleepImage = "busybox"
)