From 011629fb5a852e98ad65aad4ecec712e4a4655eb Mon Sep 17 00:00:00 2001 From: Derek McQuay Date: Mon, 6 Feb 2017 10:28:44 -0800 Subject: [PATCH] kubeadm: change os.Remove to os.RemoveAll This would not correctly clean out the tmp dir, since os.Remove doesn't recursively remove dirs, which could exist in the tmp dir. --- cmd/kubeadm/app/phases/certs/certs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/phases/certs/certs_test.go b/cmd/kubeadm/app/phases/certs/certs_test.go index 8b1eb7a4d6..b398c41315 100644 --- a/cmd/kubeadm/app/phases/certs/certs_test.go +++ b/cmd/kubeadm/app/phases/certs/certs_test.go @@ -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