66 "encoding/json"
77 "fmt"
88 "io"
9- "io/ioutil"
109 "os"
1110 "os/exec"
1211 "path/filepath"
@@ -323,7 +322,7 @@ func (t *testIO) Wait() error {
323322}
324323
325324func readPidFile(path string) (int, error) {
326- data, err := ioutil .ReadFile(path)
325+ data, err := os .ReadFile(path)
327326 if err != nil {
328327 return -1, errors.Wrap(err, "failed to read pidfile")
329328 }
@@ -335,7 +334,7 @@ func readPidFile(path string) (int, error) {
335334}
336335
337336func createTempDir(t *testing.T) string {
338- tempDir, err := ioutil.TempDir ("", "test")
337+ tempDir, err := os.MkdirTemp ("", "test")
339338 if err != nil {
340339 t.Fatalf("failed to create temporary directory: %s", err)
341340 }
@@ -367,7 +366,7 @@ func getLayers(t *testing.T, imageName string) []string {
367366
368367func getLayerChain(t *testing.T, layerFolder string) []string {
369368 jPath := filepath.Join(layerFolder, "layerchain.json")
370- content, err := ioutil .ReadFile(jPath)
369+ content, err := os .ReadFile(jPath)
371370 if os.IsNotExist(err) {
372371 t.Fatalf("layerchain not found")
373372 } else if err != nil {
0 commit comments