mirror of https://github.com/k3s-io/k3s
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
commit
751cbc9b0c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue