mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
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:
commit
751cbc9b0c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user