Skip to content

Commit

Permalink
build: use pkg os instead of ioutil
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Jan 27, 2023
1 parent a010510 commit 99629bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"testing"
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 99629bc

Please sign in to comment.