From b8bf60c590191625b21698ad6ee9e995cb98905c Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 25 Aug 2022 15:36:00 +0200 Subject: [PATCH] integration-cli: TestEventsOOM* broken on GitHub Runner Signed-off-by: CrazyMax --- integration-cli/docker_cli_events_unix_test.go | 3 +++ integration-cli/requirements_test.go | 4 ++++ testutil/environment/environment.go | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/integration-cli/docker_cli_events_unix_test.go b/integration-cli/docker_cli_events_unix_test.go index 81076845d1..6848bcca84 100644 --- a/integration-cli/docker_cli_events_unix_test.go +++ b/integration-cli/docker_cli_events_unix_test.go @@ -19,6 +19,7 @@ import ( "golang.org/x/sys/unix" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" + "gotest.tools/v3/skip" ) // #5979 @@ -50,6 +51,7 @@ func (s *DockerCLIEventSuite) TestEventsRedirectStdout(c *testing.T) { func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) { testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport, NotPpc64le) + skip.If(c, GitHubActions, "FIXME: https://github.com/moby/moby/pull/36541") errChan := make(chan error, 1) go func() { @@ -80,6 +82,7 @@ func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) { func (s *DockerCLIEventSuite) TestEventsOOMDisableTrue(c *testing.T) { testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotArm, swapMemorySupport, NotPpc64le) + skip.If(c, GitHubActions, "FIXME: https://github.com/moby/moby/pull/36541") errChan := make(chan error, 1) observer, err := newEventObserver(c) diff --git a/integration-cli/requirements_test.go b/integration-cli/requirements_test.go index c2b16fc2f8..8b0be9bc74 100644 --- a/integration-cli/requirements_test.go +++ b/integration-cli/requirements_test.go @@ -69,6 +69,10 @@ func UnixCli() bool { return isUnixCli } +func GitHubActions() bool { + return os.Getenv("GITHUB_ACTIONS") != "" +} + func Network() bool { // Set a timeout on the GET at 15s const timeout = 15 * time.Second diff --git a/testutil/environment/environment.go b/testutil/environment/environment.go index 88a9a7cf27..9f1b9eb472 100644 --- a/testutil/environment/environment.go +++ b/testutil/environment/environment.go @@ -224,5 +224,5 @@ func EnsureFrozenImagesLinux(testEnv *Execution) error { // GitHubActions is true if test is executed on a GitHub Runner. func (e *Execution) GitHubActions() bool { - return os.Getenv("GITHUB_ACTIONS") == "true" + return os.Getenv("GITHUB_ACTIONS") != "" }