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 ```
This commit is contained in:
		| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Submit Queue
					Kubernetes Submit Queue