mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Remove deprecated io/ioutil (#15707)
This commit is contained in:
@@ -22,7 +22,6 @@ package mountinfo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -40,7 +39,7 @@ func TestCrossDeviceMountPaths(t *testing.T) {
|
||||
var err error
|
||||
dir := t.TempDir()
|
||||
mountsPath := filepath.Join(dir, "mounts")
|
||||
if err = ioutil.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
if err = os.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Failure case where we detected successfully cross device mounts.
|
||||
@@ -89,7 +88,7 @@ func TestCrossDeviceMount(t *testing.T) {
|
||||
var err error
|
||||
dir := t.TempDir()
|
||||
mountsPath := filepath.Join(dir, "mounts")
|
||||
if err = ioutil.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
if err = os.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
mounts, err := readProcMounts(mountsPath)
|
||||
@@ -138,7 +137,7 @@ func TestReadProcmountInfos(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
|
||||
mountsPath := filepath.Join(dir, "mounts")
|
||||
if err = ioutil.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
if err = os.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Verifies if reading each line worked properly.
|
||||
|
||||
Reference in New Issue
Block a user