Remove ioutil in kubelet and its tests
Signed-off-by: inosato <si17_21@yahoo.co.jp>
This commit is contained in:
@@ -21,7 +21,6 @@ package cm
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
@@ -148,11 +147,11 @@ func TestSoftRequirementsValidationSuccess(t *testing.T) {
|
||||
t.Skip("skipping cgroup v1 test on a cgroup v2 system")
|
||||
}
|
||||
req := require.New(t)
|
||||
tempDir, err := ioutil.TempDir("", "")
|
||||
tempDir, err := os.MkdirTemp("", "")
|
||||
req.NoError(err)
|
||||
defer os.RemoveAll(tempDir)
|
||||
req.NoError(ioutil.WriteFile(path.Join(tempDir, "cpu.cfs_period_us"), []byte("0"), os.ModePerm))
|
||||
req.NoError(ioutil.WriteFile(path.Join(tempDir, "cpu.cfs_quota_us"), []byte("0"), os.ModePerm))
|
||||
req.NoError(os.WriteFile(path.Join(tempDir, "cpu.cfs_period_us"), []byte("0"), os.ModePerm))
|
||||
req.NoError(os.WriteFile(path.Join(tempDir, "cpu.cfs_quota_us"), []byte("0"), os.ModePerm))
|
||||
mountInt := mount.NewFakeMounter(
|
||||
[]mount.MountPoint{
|
||||
{
|
||||
|
Reference in New Issue
Block a user