Skip to content

Commit

Permalink
Merge pull request moby#40117 from andrewhsu/x
Browse files Browse the repository at this point in the history
Windows: disable flaky test TestStartReturnCorrectExitCode
  • Loading branch information
thaJeztah authored Oct 22, 2019
2 parents 684d0ba + 1be272e commit 248c136
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions integration-cli/docker_cli_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package main

import (
"fmt"
"runtime"
"strconv"
"strings"
"testing"
"time"

"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/pkg/parsers/kernel"
"gotest.tools/assert"
"gotest.tools/icmd"
)
Expand Down Expand Up @@ -186,6 +189,18 @@ func (s *DockerSuite) TestStartAttachWithRename(c *testing.T) {
}

func (s *DockerSuite) TestStartReturnCorrectExitCode(c *testing.T) {
// Note we parse kernel.GetKernelVersion rather than system.GetOSVersion
// as test binaries aren't manifested, so would otherwise report the wrong
// build number.
if runtime.GOOS == "windows" {
v, err := kernel.GetKernelVersion()
assert.NilError(c, err)
build, _ := strconv.Atoi(strings.Split(strings.SplitN(v.String(), " ", 3)[2][1:], ".")[0])
if build < 16299 {
c.Skip("FLAKY on Windows RS1, see #38521")
}
}

dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")

Expand Down

0 comments on commit 248c136

Please sign in to comment.