Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 3310fa7

Browse files
cpuguy83thaJeztah
authored andcommitted
Fix Service TTY test so signal handlers work
Noticed this test container not exiting correctly while debugging another issue. Before this change, signals were being eaten by bash, now they are hanlded by top. This cuts the test time in half since it doesn't have to wait for docker to SIGKILL it. Old: PASS: docker_cli_swarm_test.go:840: DockerSwarmSuite.TestSwarmServiceTTY 18.997s New: PASS: docker_cli_swarm_test.go:840: DockerSwarmSuite.TestSwarmServiceTTY 6.293s Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit e6c5563ae9d083cc72fcf84796c542047ac0a299) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: eba485a3c6ac41bf844279c13a88844a512de4ac Component: engine
1 parent f858816 commit 3310fa7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/engine/integration-cli/docker_cli_swarm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ func (s *DockerSwarmSuite) TestSwarmServiceTTY(c *check.C) {
842842

843843
name := "top"
844844

845-
ttyCheck := "if [ -t 0 ]; then echo TTY > /status && top; else echo none > /status && top; fi"
845+
ttyCheck := "if [ -t 0 ]; then echo TTY > /status; else echo none > /status; fi; exec top"
846846

847847
// Without --tty
848848
expectedOutput := "none"

0 commit comments

Comments
 (0)