diff --git a/pkg/controller/pod_test.go b/pkg/controller/pod_test.go index 66064940..9a2e0842 100644 --- a/pkg/controller/pod_test.go +++ b/pkg/controller/pod_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" "os" "path" "testing" @@ -52,8 +51,8 @@ var _ = Describe("Dynamic Attachment controller", func() { ) var err error - cniConfigDir, err = ioutil.TempDir("", "multus-config") - Expect(err).ToNot(HaveOccurred()) + cniConfigDir, err = os.MkdirTemp("", "multus-config") + Expect(err).NotTo(HaveOccurred()) Expect(os.MkdirAll(cniConfigDir, configFilePermissions)).To(Succeed()) Expect(os.WriteFile( path.Join(cniConfigDir, multusConfigPath),