Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
cleanup TempDir properly
Browse files Browse the repository at this point in the history
a TempDir is like /tmp/minipath255070191/.minikube

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
  • Loading branch information
zhijianli88 committed Jun 16, 2020
1 parent 840889d commit 7936eea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/drivers/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

func Test_createDiskImage(t *testing.T) {
tmpdir := tests.MakeTempDir()
defer os.RemoveAll(tmpdir)
defer tests.RemoveTempDir(tmpdir)

sshPath := filepath.Join(tmpdir, "ssh")
if err := ioutil.WriteFile(sshPath, []byte("mysshkey"), 0644); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/hyperkit/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var validLeases = []byte(`{

func Test_getIpAddressFromFile(t *testing.T) {
tmpdir := tests.MakeTempDir()
defer os.RemoveAll(tmpdir)
defer tests.RemoveTempDir(tmpdir)

dhcpFile := filepath.Join(tmpdir, "dhcp")
if err := ioutil.WriteFile(dhcpFile, validLeases, 0644); err != nil {
Expand Down

0 comments on commit 7936eea

Please sign in to comment.