瀏覽代碼

integration-cli: TestEventsOOM* broken on GitHub Runner

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 2 年之前
父節點
當前提交
b8bf60c590

+ 3 - 0
integration-cli/docker_cli_events_unix_test.go

@@ -19,6 +19,7 @@ import (
 	"golang.org/x/sys/unix"
 	"golang.org/x/sys/unix"
 	"gotest.tools/v3/assert"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
 	is "gotest.tools/v3/assert/cmp"
+	"gotest.tools/v3/skip"
 )
 )
 
 
 // #5979
 // #5979
@@ -50,6 +51,7 @@ func (s *DockerCLIEventSuite) TestEventsRedirectStdout(c *testing.T) {
 
 
 func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) {
 func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) {
 	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport, NotPpc64le)
 	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport, NotPpc64le)
+	skip.If(c, GitHubActions, "FIXME: https://github.com/moby/moby/pull/36541")
 
 
 	errChan := make(chan error, 1)
 	errChan := make(chan error, 1)
 	go func() {
 	go func() {
@@ -80,6 +82,7 @@ func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) {
 
 
 func (s *DockerCLIEventSuite) TestEventsOOMDisableTrue(c *testing.T) {
 func (s *DockerCLIEventSuite) TestEventsOOMDisableTrue(c *testing.T) {
 	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotArm, swapMemorySupport, NotPpc64le)
 	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)
 	errChan := make(chan error, 1)
 	observer, err := newEventObserver(c)
 	observer, err := newEventObserver(c)

+ 4 - 0
integration-cli/requirements_test.go

@@ -69,6 +69,10 @@ func UnixCli() bool {
 	return isUnixCli
 	return isUnixCli
 }
 }
 
 
+func GitHubActions() bool {
+	return os.Getenv("GITHUB_ACTIONS") != ""
+}
+
 func Network() bool {
 func Network() bool {
 	// Set a timeout on the GET at 15s
 	// Set a timeout on the GET at 15s
 	const timeout = 15 * time.Second
 	const timeout = 15 * time.Second

+ 1 - 1
testutil/environment/environment.go

@@ -224,5 +224,5 @@ func EnsureFrozenImagesLinux(testEnv *Execution) error {
 
 
 // GitHubActions is true if test is executed on a GitHub Runner.
 // GitHubActions is true if test is executed on a GitHub Runner.
 func (e *Execution) GitHubActions() bool {
 func (e *Execution) GitHubActions() bool {
-	return os.Getenv("GITHUB_ACTIONS") == "true"
+	return os.Getenv("GITHUB_ACTIONS") != ""
 }
 }