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

Commit 1aa32f5

Browse files
committed
Windows: disable flaky test TestStartReturnCorrectExitCode
Signed-off-by: Andrew Hsu <andrewhsu@docker.com> (cherry picked from commit 1be272ef76ec7f37d680525e725c1a17a85a32cf) Signed-off-by: Andrew Hsu <andrewhsu@docker.com> Upstream-commit: 031ef2dc8e0510280c9e55d07b8287e0a73c7fcc Component: engine
1 parent 1e9446f commit 1aa32f5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

components/engine/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)