Remove references to io/ioutil package

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
This commit is contained in:
Austin Vazquez
2022-12-01 22:27:05 +00:00
parent 7e9ada51e7
commit 1a6f478913
23 changed files with 80 additions and 99 deletions

View File

@ -17,7 +17,6 @@ package ns_test
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
@ -208,7 +207,7 @@ var _ = Describe("Linux namespace operations", func() {
})
It("fails when the path is not a namespace", func() {
tempFile, err := ioutil.TempFile("", "nstest")
tempFile, err := os.CreateTemp("", "nstest")
Expect(err).NotTo(HaveOccurred())
defer tempFile.Close()
@ -262,7 +261,7 @@ var _ = Describe("Linux namespace operations", func() {
})
It("should refuse other paths", func() {
tempFile, err := ioutil.TempFile("", "nstest")
tempFile, err := os.CreateTemp("", "nstest")
Expect(err).NotTo(HaveOccurred())
defer tempFile.Close()