Commit 751cbc9b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents e0db0932 011629fb
......@@ -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
......
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