helm/pkg
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
..
action test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
chart Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
chartutil test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
cli Merge pull request #9182 from pscheid92/4030-provide-literal-alternative-for-set-flag 2023-04-28 14:39:41 -04:00
downloader test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
engine Merge pull request #11758 from joejulian/remove_blank_list_item_from_files_lines 2023-07-24 19:16:28 -07:00
gates Bump the Go version 2023-03-22 11:29:26 -04:00
getter Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
helmpath replace +build with go:build 2022-04-14 07:56:31 -07:00
kube Merge pull request #9950 from jeffrosenberg/error-on-failed-jobs-9285 2023-07-13 08:21:58 -07:00
lint test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
plugin test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
postrender test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
provenance Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
pusher Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
registry Added tests for created OCI annotation time format 2023-07-04 04:51:46 -05:00
release Addressing review comments - move printing code out of client.go 2022-09-09 13:29:19 -07:00
releaseutil Bump the Go version 2023-03-22 11:29:26 -04:00
repo test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
storage Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
strvals Merge pull request #9182 from pscheid92/4030-provide-literal-alternative-for-set-flag 2023-04-28 14:39:41 -04:00
time remove redudant time func 2020-09-23 23:32:56 +02:00
uploader Bump the Go version 2023-03-22 11:29:26 -04:00