Skip to content

Commit a63a02f

Browse files
committed
integration-cli: remove defaultSleepImage constant
Both Linux and Windows now use busybox, so no need to keep a constant for this. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 27f432c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent f76cb3e commit a63a02f

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

integration-cli/benchmark_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (s *DockerSuite) BenchmarkConcurrentContainerActions(c *check.C) {
2828
go func() {
2929
defer innerGroup.Done()
3030
for i := 0; i < numIterations; i++ {
31-
args := []string{"run", "-d", defaultSleepImage}
31+
args := []string{"run", "-d", "busybox"}
3232
args = append(args, sleepCommandForDaemonPlatform()...)
3333
out, _, err := dockerCmdWithError(args...)
3434
if err != nil {

integration-cli/docker_cli_service_scale_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ func (s *DockerSwarmSuite) TestServiceScale(c *check.C) {
1414
d := s.AddDaemon(c, true, true)
1515

1616
service1Name := "TestService1"
17-
service1Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service1Name, defaultSleepImage}, sleepCommandForDaemonPlatform()...)
17+
service1Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service1Name, "busybox"}, sleepCommandForDaemonPlatform()...)
1818

1919
// global mode
2020
service2Name := "TestService2"
21-
service2Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service2Name, "--mode=global", defaultSleepImage}, sleepCommandForDaemonPlatform()...)
21+
service2Args := append([]string{"service", "create", "--detach", "--no-resolve-image", "--name", service2Name, "--mode=global", "busybox"}, sleepCommandForDaemonPlatform()...)
2222

2323
// Create services
2424
_, err := d.Cmd(service1Args...)

integration-cli/docker_utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func getInspectBody(c *check.C, version, id string) []byte {
347347
// Run a long running idle task in a background container using the
348348
// system-specific default image and command.
349349
func runSleepingContainer(c *check.C, extraArgs ...string) string {
350-
return runSleepingContainerInImage(c, defaultSleepImage, extraArgs...)
350+
return runSleepingContainerInImage(c, "busybox", extraArgs...)
351351
}
352352

353353
// Run a long running idle task in a background container using the specified

integration-cli/test_vars_unix_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@ const (
77
isUnixCli = true
88

99
expectedFileChmod = "-rw-r--r--"
10-
11-
// On Unix variants, the busybox image comes with the `top` command which
12-
// runs indefinitely while still being interruptible by a signal.
13-
defaultSleepImage = "busybox"
1410
)

integration-cli/test_vars_windows_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ const (
88

99
// this is the expected file permission set on windows: gh#11395
1010
expectedFileChmod = "-rwxr-xr-x"
11-
12-
// On Windows, the busybox image doesn't have the `top` command, so we rely
13-
// on `sleep` with a high duration.
14-
defaultSleepImage = "busybox"
1511
)

0 commit comments

Comments
 (0)