diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2022-11-11 08:39:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 08:39:09 +0100 |
commit | 18f8ab6fbd8a55483882f40083731270bc4683e1 (patch) | |
tree | e55f039323a4a46c55bdf4dd84c71f2abd65b737 /integration | |
parent | bccc3a652bd19320cee05292de88fd8e5ecab2d8 (diff) | |
parent | 6fd2d4e77258de3c0eb060a92ccb489351bcd142 (diff) | |
download | docker-18f8ab6fbd8a55483882f40083731270bc4683e1.tar.gz |
Merge pull request #44274 from thaJeztah/integration_cli_no_pkg_system
integration(-cli): remove uses of pkg/system.Stat()
Diffstat (limited to 'integration')
-rw-r--r-- | integration/container/mounts_linux_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/integration/container/mounts_linux_test.go b/integration/container/mounts_linux_test.go index 3c7aabda24..07bae777ea 100644 --- a/integration/container/mounts_linux_test.go +++ b/integration/container/mounts_linux_test.go @@ -3,7 +3,9 @@ package container // import "github.com/docker/docker/integration/container" import ( "context" "fmt" + "os" "path/filepath" + "syscall" "testing" "time" @@ -14,7 +16,6 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/docker/docker/client" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/pkg/system" "github.com/moby/sys/mount" "github.com/moby/sys/mountinfo" "gotest.tools/v3/assert" @@ -80,9 +81,10 @@ func TestContainerNetworkMountsNoChown(t *testing.T) { // daemon. In all other volume/bind mount situations we have taken this // same line--we don't chown host file content. // See GitHub PR 34224 for details. - statT, err := system.Stat(tmpNWFileMount) + info, err := os.Stat(tmpNWFileMount) assert.NilError(t, err) - assert.Check(t, is.Equal(uint32(0), statT.UID()), "bind mounted network file should not change ownership from root") + fi := info.Sys().(*syscall.Stat_t) + assert.Check(t, is.Equal(fi.Uid, uint32(0)), "bind mounted network file should not change ownership from root") } func TestMountDaemonRoot(t *testing.T) { |