Skip to content

Commit

Permalink
Merge pull request moby#46507 from rumpl/c8d-fix-tests
Browse files Browse the repository at this point in the history
c8d: Skip TestRemoveImageGarbageCollector
  • Loading branch information
thaJeztah authored Sep 18, 2023
2 parents f13065b + 6c563cd commit 5d87dc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions integration-cli/docker_cli_daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2539,15 +2539,15 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *testing.T) {
}

func (s *DockerDaemonSuite) TestRemoveContainerAfterLiveRestore(c *testing.T) {
testRequires(c, DaemonIsLinux, overlayFSSupported, testEnv.IsLocalDaemon)
s.d.StartWithBusybox(testutil.GetContext(c), c, "--live-restore", "--storage-driver", "overlay2")
testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon)
s.d.StartWithBusybox(testutil.GetContext(c), c, "--live-restore")
out, err := s.d.Cmd("run", "-d", "--name=top", "busybox", "top")
assert.NilError(c, err, "Output: %s", out)

s.d.WaitRun("top")

// restart daemon.
s.d.Restart(c, "--live-restore", "--storage-driver", "overlay2")
s.d.Restart(c, "--live-restore")

out, err = s.d.Cmd("stop", "top")
assert.NilError(c, err, "Output: %s", out)
Expand Down
11 changes: 0 additions & 11 deletions integration-cli/requirements_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
package main

import (
"bytes"
"os"
"os/exec"
"strings"

"github.com/docker/docker/pkg/sysinfo"
Expand Down Expand Up @@ -73,12 +71,3 @@ func unprivilegedUsernsClone() bool {
content, err := os.ReadFile("/proc/sys/kernel/unprivileged_userns_clone")
return err != nil || !strings.Contains(string(content), "0")
}

func overlayFSSupported() bool {
cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems")
out, err := cmd.CombinedOutput()
if err != nil {
return false
}
return bytes.Contains(out, []byte("overlay\n"))
}
1 change: 1 addition & 0 deletions integration/image/remove_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestRemoveImageGarbageCollector(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType != "linux")
skip.If(t, testEnv.NotAmd64)
skip.If(t, testEnv.IsRootless, "rootless mode doesn't support overlay2 on most distros")
skip.If(t, testEnv.UsingSnapshotter, "tests the graph driver layer store that's not used with the containerd image store")

ctx := testutil.StartSpan(baseContext, t)

Expand Down

0 comments on commit 5d87dc9

Please sign in to comment.