From 99629bc43bca8897b2e2a3898f53f1110cdb33d7 Mon Sep 17 00:00:00 2001 From: Miguel Duarte Barroso Date: Thu, 5 Jan 2023 17:43:27 +0100 Subject: [PATCH] build: use pkg os instead of ioutil Signed-off-by: Miguel Duarte Barroso --- pkg/controller/pod_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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),