helm/pkg/plugin
Eng Zer Jun 2ceebffc77
test: replace ensure.TempDir with t.TempDir
This commit replaces `ensure.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ensure.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-07-29 16:11:22 +08:00
..
cache Updating the module for v3 as the major version 2019-10-03 14:27:05 -04:00
installer test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
testdata/plugdir Update HELM_PLUGIN_SELF -> HELM_PLUGIN_DIR (#10380) 2021-11-25 23:50:53 -08:00
hooks.go Updating the module for v3 as the major version 2019-10-03 14:27:05 -04:00
plugin.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
plugin_test.go Fix 32bit-x86 typo in testsuite 2023-03-28 15:10:19 +02:00