Skip to content

Commit

Permalink
Merge pull request #106 from austinvazquez/remove-ioutil
Browse files Browse the repository at this point in the history
Remove references to io/ioutil package
  • Loading branch information
estesp authored Oct 26, 2022
2 parents d5ace69 + fecb8c8 commit f108694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions integration/cni_setup_teardown_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"context"
"crypto/rand"
"fmt"
"io/ioutil"
"os"
"path"
"runtime"
Expand Down Expand Up @@ -146,7 +145,7 @@ func TestBasicSetupAndRemove(t *testing.T) {
defer os.RemoveAll(tmpPluginConfDir)

assert.NoError(t,
ioutil.WriteFile(
os.WriteFile(
path.Join(tmpPluginConfDir, "10-gocni-test-net.conflist"),
[]byte(cniBridgePluginCfg),
0600,
Expand Down Expand Up @@ -231,7 +230,7 @@ func TestBasicSetupAndRemovePluginWithoutVersion(t *testing.T) {
defer os.RemoveAll(tmpPluginConfDir)

assert.NoError(t,
ioutil.WriteFile(
os.WriteFile(
path.Join(tmpPluginConfDir, "10-gocni-test-net.conflist"),
[]byte(cniBridgePluginCfgWithoutVersion),
0600,
Expand Down
3 changes: 1 addition & 2 deletions testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ package cni

import (
"fmt"
"io/ioutil"
"os"
"path"
"testing"
)

func makeTmpDir(prefix string) (string, error) {
tmpDir, err := ioutil.TempDir(os.TempDir(), prefix)
tmpDir, err := os.MkdirTemp("", prefix)
if err != nil {
return "", err
}
Expand Down

0 comments on commit f108694

Please sign in to comment.