From ba4c8029c2faa452496dd743fa41b55e20c9614c Mon Sep 17 00:00:00 2001 From: Li Zhijian Date: Wed, 9 Sep 2020 13:22:41 +0800 Subject: [PATCH] Use T.cleanup() to cleanup helm-action-test T.Cleanup() is introduced since go-1.14 Signed-off-by: Li Zhijian --- pkg/action/action_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 0cbdb162b..c05b4403d 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -20,6 +20,7 @@ import ( "flag" "io/ioutil" "net/http" + "os" "path/filepath" "testing" @@ -56,6 +57,8 @@ func actionConfigFixture(t *testing.T) *Configuration { t.Fatal(err) } + t.Cleanup(func() { os.RemoveAll(tdir) }) + cache, err := registry.NewCache( registry.CacheOptDebug(true), registry.CacheOptRoot(filepath.Join(tdir, registry.CacheRootDir)),