Skip to content

Commit 1be272e

Browse files
committed
Windows: disable flaky test TestStartReturnCorrectExitCode
Signed-off-by: Andrew Hsu <[email protected]>
1 parent ac5acef commit 1be272e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

integration-cli/docker_cli_start_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ package main
22

33
import (
44
"fmt"
5+
"runtime"
6+
"strconv"
57
"strings"
68
"testing"
79
"time"
810

911
"github.com/docker/docker/integration-cli/cli"
12+
"github.com/docker/docker/pkg/parsers/kernel"
1013
"gotest.tools/assert"
1114
"gotest.tools/icmd"
1215
)
@@ -186,6 +189,18 @@ func (s *DockerSuite) TestStartAttachWithRename(c *testing.T) {
186189
}
187190

188191
func (s *DockerSuite) TestStartReturnCorrectExitCode(c *testing.T) {
192+
// Note we parse kernel.GetKernelVersion rather than system.GetOSVersion
193+
// as test binaries aren't manifested, so would otherwise report the wrong
194+
// build number.
195+
if runtime.GOOS == "windows" {
196+
v, err := kernel.GetKernelVersion()
197+
assert.NilError(c, err)
198+
build, _ := strconv.Atoi(strings.Split(strings.SplitN(v.String(), " ", 3)[2][1:], ".")[0])
199+
if build < 16299 {
200+
c.Skip("FLAKY on Windows RS1, see #38521")
201+
}
202+
}
203+
189204
dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
190205
dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")
191206

0 commit comments

Comments
 (0)