mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
fix #12188 integration-cli: tests using "sleep" can timeout too early - change to "top" instead
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
This commit is contained in:
@ -110,9 +110,9 @@ func TestLinksPingLinkedContainers(t *testing.T) {
|
||||
func TestLinksPingLinkedContainersAfterRename(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
out, _, _ := dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
out, _, _ := dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "top")
|
||||
idA := strings.TrimSpace(out)
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "sleep", "10")
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "top")
|
||||
idB := strings.TrimSpace(out)
|
||||
dockerCmd(t, "rename", "container1", "container_new")
|
||||
dockerCmd(t, "run", "--rm", "--link", "container_new:alias1", "--link", "container2:alias2", "busybox", "sh", "-c", "ping -c 1 alias1 -W 1 && ping -c 1 alias2 -W 1")
|
||||
@ -126,8 +126,8 @@ func TestLinksIpTablesRulesWhenLinkAndUnlink(t *testing.T) {
|
||||
testRequires(t, SameHostDaemon)
|
||||
defer deleteAllContainers()
|
||||
|
||||
dockerCmd(t, "run", "-d", "--name", "child", "--publish", "8080:80", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "parent", "--link", "child:http", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "child", "--publish", "8080:80", "busybox", "top")
|
||||
dockerCmd(t, "run", "-d", "--name", "parent", "--link", "child:http", "busybox", "top")
|
||||
|
||||
childIP := findContainerIP(t, "child")
|
||||
parentIP := findContainerIP(t, "parent")
|
||||
@ -155,9 +155,9 @@ func TestLinksInspectLinksStarted(t *testing.T) {
|
||||
result []string
|
||||
)
|
||||
defer deleteAllContainers()
|
||||
dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "testinspectlink", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "top")
|
||||
dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "top")
|
||||
dockerCmd(t, "run", "-d", "--name", "testinspectlink", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "top")
|
||||
links, err := inspectFieldJSON("testinspectlink", "HostConfig.Links")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -184,8 +184,8 @@ func TestLinksInspectLinksStopped(t *testing.T) {
|
||||
result []string
|
||||
)
|
||||
defer deleteAllContainers()
|
||||
dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "sleep", "10")
|
||||
dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "top")
|
||||
dockerCmd(t, "run", "-d", "--name", "container2", "busybox", "top")
|
||||
dockerCmd(t, "run", "-d", "--name", "testinspectlink", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "true")
|
||||
links, err := inspectFieldJSON("testinspectlink", "HostConfig.Links")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user