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.
This commit is contained in:
Derek McQuay
2017-02-06 10:28:44 -08:00
parent 9e427c88c4
commit 011629fb5a

View File

@@ -32,7 +32,7 @@ func TestCreatePKIAssets(t *testing.T) {
if err != nil {
t.Fatalf("Couldn't create tmpdir")
}
defer os.Remove(tmpdir)
defer os.RemoveAll(tmpdir)
var tests = []struct {
cfg *kubeadmapi.MasterConfiguration