mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #20961 from Microsoft/FlakeyTestFix
Reenabled TestPsListContainers* tests and increased sleep time
This commit is contained in:
commit
9e2c4de0de
2 changed files with 2 additions and 50 deletions
|
@ -17,10 +17,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersBase(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersBase(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
out, _ := runSleepingContainer(c, "-d")
|
out, _ := runSleepingContainer(c, "-d")
|
||||||
firstID := strings.TrimSpace(out)
|
firstID := strings.TrimSpace(out)
|
||||||
|
|
||||||
|
@ -123,11 +119,6 @@ func (s *DockerSuite) TestPsListContainersBase(c *check.C) {
|
||||||
|
|
||||||
// FIXME remove this for 1.12 as --since and --before are deprecated
|
// FIXME remove this for 1.12 as --since and --before are deprecated
|
||||||
func (s *DockerSuite) TestPsListContainersDeprecatedSinceAndBefore(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersDeprecatedSinceAndBefore(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
out, _ := runSleepingContainer(c, "-d")
|
out, _ := runSleepingContainer(c, "-d")
|
||||||
firstID := strings.TrimSpace(out)
|
firstID := strings.TrimSpace(out)
|
||||||
|
|
||||||
|
@ -223,11 +214,6 @@ func assertContainerList(out string, expected []string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Problematic on Windows as it doesn't report the size correctly @swernli
|
// Problematic on Windows as it doesn't report the size correctly @swernli
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
dockerCmd(c, "run", "-d", "busybox")
|
dockerCmd(c, "run", "-d", "busybox")
|
||||||
|
@ -270,11 +256,6 @@ func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterStatus(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterStatus(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// start exited container
|
// start exited container
|
||||||
out, _ := dockerCmd(c, "run", "-d", "busybox")
|
out, _ := dockerCmd(c, "run", "-d", "busybox")
|
||||||
firstID := strings.TrimSpace(out)
|
firstID := strings.TrimSpace(out)
|
||||||
|
@ -314,11 +295,6 @@ func (s *DockerSuite) TestPsListContainersFilterStatus(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterID(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterID(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// start container
|
// start container
|
||||||
out, _ := dockerCmd(c, "run", "-d", "busybox")
|
out, _ := dockerCmd(c, "run", "-d", "busybox")
|
||||||
firstID := strings.TrimSpace(out)
|
firstID := strings.TrimSpace(out)
|
||||||
|
@ -334,11 +310,6 @@ func (s *DockerSuite) TestPsListContainersFilterID(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterName(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterName(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// start container
|
// start container
|
||||||
dockerCmd(c, "run", "--name=a_name_to_match", "busybox")
|
dockerCmd(c, "run", "--name=a_name_to_match", "busybox")
|
||||||
id, err := getIDByName("a_name_to_match")
|
id, err := getIDByName("a_name_to_match")
|
||||||
|
@ -362,11 +333,6 @@ func (s *DockerSuite) TestPsListContainersFilterName(c *check.C) {
|
||||||
// - Run containers for each of those image (busybox, images_ps_filter_test1, images_ps_filter_test2)
|
// - Run containers for each of those image (busybox, images_ps_filter_test1, images_ps_filter_test2)
|
||||||
// - Filter them out :P
|
// - Filter them out :P
|
||||||
func (s *DockerSuite) TestPsListContainersFilterAncestorImage(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterAncestorImage(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build images
|
// Build images
|
||||||
imageName1 := "images_ps_filter_test1"
|
imageName1 := "images_ps_filter_test1"
|
||||||
imageID1, err := buildImage(imageName1,
|
imageID1, err := buildImage(imageName1,
|
||||||
|
@ -468,11 +434,6 @@ func checkPsAncestorFilterOutput(c *check.C, out string, filterName string, expe
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// start container
|
// start container
|
||||||
dockerCmd(c, "run", "--name=first", "-l", "match=me", "-l", "second=tag", "busybox")
|
dockerCmd(c, "run", "--name=first", "-l", "match=me", "-l", "second=tag", "busybox")
|
||||||
firstID, err := getIDByName("first")
|
firstID, err := getIDByName("first")
|
||||||
|
@ -512,11 +473,6 @@ func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterExited(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterExited(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
runSleepingContainer(c, "--name=sleep")
|
runSleepingContainer(c, "--name=sleep")
|
||||||
|
|
||||||
dockerCmd(c, "run", "--name", "zero1", "busybox", "true")
|
dockerCmd(c, "run", "--name", "zero1", "busybox", "true")
|
||||||
|
@ -636,11 +592,6 @@ func (s *DockerSuite) TestPsWithSize(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsListContainersFilterCreated(c *check.C) {
|
func (s *DockerSuite) TestPsListContainersFilterCreated(c *check.C) {
|
||||||
// TODO Windows: Figure out why TestPsListContainers* are flakey
|
|
||||||
if daemonPlatform == "windows" {
|
|
||||||
c.Skip("Flaky on windowsTP4")
|
|
||||||
}
|
|
||||||
|
|
||||||
// create a container
|
// create a container
|
||||||
out, _ := dockerCmd(c, "create", "busybox")
|
out, _ := dockerCmd(c, "create", "busybox")
|
||||||
cID := strings.TrimSpace(out)
|
cID := strings.TrimSpace(out)
|
||||||
|
|
|
@ -14,4 +14,5 @@ const (
|
||||||
defaultSleepImage = "busybox"
|
defaultSleepImage = "busybox"
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultSleepCommand = []string{"sleep", "60"}
|
// TODO Windows: In TP5, decrease this sleep time, as performance will be better
|
||||||
|
var defaultSleepCommand = []string{"sleep", "120"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue