helm/pkg/plugin/installer
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
..
base.go fix HELM PLUGINS behavior another_way 2021-08-07 09:38:17 +08:00
base_test.go add unittest 2021-08-07 09:48:37 +08:00
doc.go Updating the module for v3 as the major version 2019-10-03 14:27:05 -04:00
http_installer.go fix a few function names on comments 2022-10-17 20:41:59 +08:00
http_installer_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
installer.go improve the HTTP detection for tar archives 2020-09-17 11:54:07 -06:00
installer_test.go improve the HTTP detection for tar archives 2020-09-17 11:54:07 -06:00
local_installer.go improve error message on plugin install 2022-11-09 10:41:55 +01:00
local_installer_test.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
vcs_installer.go fix(pkg/plugin): copy plugins directly to the data directory (#7962) 2020-04-22 15:33:01 -07:00
vcs_installer_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00