mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
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 kubelet
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -146,7 +145,7 @@ func TestCleanupOrphanedPodDirs(t *testing.T) {
|
||||
if err := os.MkdirAll(volumePath, 0750); err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(filepath.Join(volumePath, "test.txt"), []byte("test1"), 0640)
|
||||
return os.WriteFile(filepath.Join(volumePath, "test.txt"), []byte("test1"), 0640)
|
||||
},
|
||||
validateFunc: func(kubelet *Kubelet) error {
|
||||
podDir := kubelet.getPodDir("pod1uid")
|
||||
@@ -160,7 +159,7 @@ func TestCleanupOrphanedPodDirs(t *testing.T) {
|
||||
if err := os.MkdirAll(subPath, 0750); err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(filepath.Join(subPath, "test.txt"), []byte("test1"), 0640)
|
||||
return os.WriteFile(filepath.Join(subPath, "test.txt"), []byte("test1"), 0640)
|
||||
},
|
||||
validateFunc: func(kubelet *Kubelet) error {
|
||||
podDir := kubelet.getPodDir("pod1uid")
|
||||
|
||||
Reference in New Issue
Block a user