integration-cli: TestRestartContainer is flaky on GitHub Runner
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
890de00f02
commit
440d051ce9
2 changed files with 8 additions and 1 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/poll"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestRestartStoppedContainer(c *testing.T) {
|
||||
|
@ -171,6 +172,7 @@ func (s *DockerSuite) TestRestartContainerSuccess(c *testing.T) {
|
|||
// such that it assumes there is a host process to kill. In Hyper-V
|
||||
// containers, the process is inside the utility VM, not on the host.
|
||||
if DaemonIsWindows() {
|
||||
skip.If(c, testEnv.GitHubActions())
|
||||
testRequires(c, testEnv.DaemonInfo.Isolation.IsProcess)
|
||||
}
|
||||
|
||||
|
@ -247,7 +249,7 @@ func (s *DockerSuite) TestRestartPolicyAfterRestart(c *testing.T) {
|
|||
// such that it assumes there is a host process to kill. In Hyper-V
|
||||
// containers, the process is inside the utility VM, not on the host.
|
||||
if DaemonIsWindows() {
|
||||
testRequires(c, testEnv.DaemonInfo.Isolation.IsProcess)
|
||||
testRequires(c, testEnv.DaemonInfo.Isolation.IsProcess, testEnv.NotGitHubActions)
|
||||
}
|
||||
|
||||
out := runSleepingContainer(c, "-d", "--restart=always")
|
||||
|
|
|
@ -221,3 +221,8 @@ func EnsureFrozenImagesLinux(testEnv *Execution) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GitHubActions is true if test is executed on a GitHub Runner.
|
||||
func (e *Execution) GitHubActions() bool {
|
||||
return os.Getenv("GITHUB_ACTIONS") == "true"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue