kubeadm: change os.Remove to os.RemoveAll

This would not correctly clean out the tmp dir, since os.Remove doesn't recursively remove dirs, which could exist in the tmp dir.
parent 9e427c88
...@@ -32,7 +32,7 @@ func TestCreatePKIAssets(t *testing.T) { ...@@ -32,7 +32,7 @@ func TestCreatePKIAssets(t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("Couldn't create tmpdir") t.Fatalf("Couldn't create tmpdir")
} }
defer os.Remove(tmpdir) defer os.RemoveAll(tmpdir)
var tests = []struct { var tests = []struct {
cfg *kubeadmapi.MasterConfiguration cfg *kubeadmapi.MasterConfiguration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment