Merge pull request #41026 from apprenda/kubeadm_fix_os_remove

Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

kubeadm: change os.Remove to os.RemoveAll

**What this PR does / why we need it**: This would not correctly clean out the tmp dir, since os.Remove doesn't recursively remove dirs, which could exist in the tmp dir.

Unit tests are a WIP from #34136

**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-02-06 16:51:10 -08:00 committed by GitHub
commit 751cbc9b0c
1 changed files with 1 additions and 1 deletions

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