1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Break out non-Windows sys/mount usage into helper

Rather than bifurcate the test completely, this lets us keep the test
intact with a small function wrapper to allow the compiler to build the
code that'll never be called on Windows, on Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
Paul "TBBle" Hampson
2020-11-06 01:23:49 +11:00
parent 3e3f3d7168
commit 7bb729e928
3 changed files with 16 additions and 2 deletions

View File

@ -30,7 +30,6 @@ import (
"github.com/docker/docker/testutil/request"
"github.com/docker/docker/volume"
"github.com/docker/go-connections/nat"
"github.com/moby/sys/mount"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
"gotest.tools/v3/poll"
@ -2056,7 +2055,7 @@ func (s *DockerSuite) TestContainersAPICreateMountsCreate(c *testing.T) {
assert.NilError(c, err)
defer os.RemoveAll(tmpDir3)
assert.Assert(c, mount.Mount(tmpDir3, tmpDir3, "none", "bind,shared") == nil)
assert.Assert(c, mountWrapper(tmpDir3, tmpDir3, "none", "bind,shared") == nil)
cases = append(cases, []testCase{
{