Use T.cleanup() to cleanup helm-action-test

T.Cleanup() is introduced since go-1.14

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
pull/8707/head
Li Zhijian 4 years ago
parent 4f7b9fcb67
commit ba4c8029c2

@ -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)),

Loading…
Cancel
Save