helm/pkg/lint/rules
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
..
testdata add some test case 2023-03-28 15:04:07 +08:00
chartfile.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
chartfile_test.go Show errors when linting for Chart.yaml version and appVersion fields of type non-string 2020-05-25 13:24:15 +05:30
dependencies.go Lint dependencies (#7970) 2020-07-09 14:31:51 -06:00
dependencies_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
deprecations.go Fix specifying of Kubernetes version from build scripts 2021-11-18 11:48:02 -05:00
deprecations_test.go Reduce linting severity for users of out-of-date kubernetes (#8608) 2021-01-05 16:05:33 -07:00
template.go Fix multiple bugs in values handling 2023-06-26 11:37:21 -04:00
template_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
values.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
values_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00