Remove ioutil in kubelet and its tests

Signed-off-by: inosato <si17_21@yahoo.co.jp>
This commit is contained in:
inosato
2022-07-18 23:51:51 +09:00
parent f6e163fe27
commit 3b95d3b076
40 changed files with 222 additions and 253 deletions

View File

@@ -20,7 +20,6 @@ limitations under the License.
package util
import (
"io/ioutil"
"net"
"os"
"testing"
@@ -102,7 +101,7 @@ func TestIsUnixDomainSocket(t *testing.T) {
},
}
for _, test := range tests {
f, err := ioutil.TempFile("", "test-domain-socket")
f, err := os.CreateTemp("", "test-domain-socket")
require.NoErrorf(t, err, "Failed to create file for test purposes: %v while setting up: %s", err, test.label)
addr := f.Name()
f.Close()