diff --git a/pkg/drivers/common_test.go b/pkg/drivers/common_test.go index 98982b9..cc250e0 100644 --- a/pkg/drivers/common_test.go +++ b/pkg/drivers/common_test.go @@ -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 { diff --git a/pkg/hyperkit/network_test.go b/pkg/hyperkit/network_test.go index 3bd538a..ae97c5e 100644 --- a/pkg/hyperkit/network_test.go +++ b/pkg/hyperkit/network_test.go @@ -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 {