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

[19.03] Windows: disable flaky test TestStartReturnCorrectExitCode #419

Merged
merged 1 commit into from
Nov 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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