[19.03] Windows: disable flaky test TestStartReturnCorrectExitCode
| ... | ... |
@@ -2,11 +2,14 @@ package main |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"fmt" |
| 5 |
+ "runtime" |
|
| 6 |
+ "strconv" |
|
| 5 | 7 |
"strings" |
| 6 | 8 |
"testing" |
| 7 | 9 |
"time" |
| 8 | 10 |
|
| 9 | 11 |
"github.com/docker/docker/integration-cli/cli" |
| 12 |
+ "github.com/docker/docker/pkg/parsers/kernel" |
|
| 10 | 13 |
"gotest.tools/assert" |
| 11 | 14 |
"gotest.tools/icmd" |
| 12 | 15 |
) |
| ... | ... |
@@ -186,6 +189,18 @@ func (s *DockerSuite) TestStartAttachWithRename(c *testing.T) {
|
| 186 | 186 |
} |
| 187 | 187 |
|
| 188 | 188 |
func (s *DockerSuite) TestStartReturnCorrectExitCode(c *testing.T) {
|
| 189 |
+ // Note we parse kernel.GetKernelVersion rather than system.GetOSVersion |
|
| 190 |
+ // as test binaries aren't manifested, so would otherwise report the wrong |
|
| 191 |
+ // build number. |
|
| 192 |
+ if runtime.GOOS == "windows" {
|
|
| 193 |
+ v, err := kernel.GetKernelVersion() |
|
| 194 |
+ assert.NilError(c, err) |
|
| 195 |
+ build, _ := strconv.Atoi(strings.Split(strings.SplitN(v.String(), " ", 3)[2][1:], ".")[0]) |
|
| 196 |
+ if build < 16299 {
|
|
| 197 |
+ c.Skip("FLAKY on Windows RS1, see #38521")
|
|
| 198 |
+ } |
|
| 199 |
+ } |
|
| 200 |
+ |
|
| 189 | 201 |
dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11") |
| 190 | 202 |
dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12") |
| 191 | 203 |
|