From 6c563cda82bd90dbb46ccdb14daeae24974e8535 Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Mon, 18 Sep 2023 14:37:17 +0200 Subject: [PATCH] c8d: fix TestRemoveContainerAfterLiveRestore There is no need to pass the storage driver to the daemon the test starts Signed-off-by: Djordje Lukic --- integration-cli/docker_cli_daemon_test.go | 6 +++--- integration-cli/requirements_unix_test.go | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index e46ca44691056..b8cbfc73b69cf 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -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) diff --git a/integration-cli/requirements_unix_test.go b/integration-cli/requirements_unix_test.go index 3e3dc0cdf2c44..bdf3d0d693f6e 100644 --- a/integration-cli/requirements_unix_test.go +++ b/integration-cli/requirements_unix_test.go @@ -3,9 +3,7 @@ package main import ( - "bytes" "os" - "os/exec" "strings" "github.com/docker/docker/pkg/sysinfo" @@ -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")) -}