diff --git a/cephfs/mount_perms_mimic_test.go b/cephfs/mount_perms_mimic_test.go index 86c98ee..9116f62 100644 --- a/cephfs/mount_perms_mimic_test.go +++ b/cephfs/mount_perms_mimic_test.go @@ -3,9 +3,6 @@ package cephfs import ( - "os" - "path" - "syscall" "testing" "github.com/stretchr/testify/assert" @@ -33,13 +30,12 @@ func TestSetMountPerms(t *testing.T) { defer func() { assert.NoError(t, mount.Unmount()) }() t.Run("checkStat", func(t *testing.T) { - useMount(t) dirname := "/check-mount-perms" err := mount.MakeDir(dirname, 0755) assert.NoError(t, err) defer mount.RemoveDir(dirname) - s, err := os.Stat(path.Join(CephMountDir, dirname)) + sx, err := mount.Statx(dirname, StatxBasicStats, 0) require.NoError(t, err) - assert.EqualValues(t, s.Sys().(*syscall.Stat_t).Gid, 500) + assert.EqualValues(t, sx.Gid, 500) }) }