提交 649819b9 编写于 作者: M Medya Gh

clean up temp dir in unit test

上级 25e69026
......@@ -151,6 +151,13 @@ func TestDeleteAllProfiles(t *testing.T) {
if err != nil {
t.Fatalf("tempdir: %v", err)
}
defer func() { //clean up tempdir
err := os.RemoveAll(td)
if err != nil {
t.Errorf("failed to clean up %q temp folder after the unit test.", td)
}
}()
err = copy.Copy("../../../pkg/minikube/config/testdata/delete-all", td)
if err != nil {
t.Fatalf("copy: %v", err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册