helm/pkg/chartutil
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 Fix multiple bugs in values handling 2023-06-26 11:37:21 -04:00
capabilities.go Fix specifying of Kubernetes version from build scripts 2021-11-18 11:48:02 -05:00
capabilities_test.go bump version to v3.12.0 2023-05-01 14:08:09 -04:00
chartfile.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
chartfile_test.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
coalesce.go Updated per feedback from gjenkins8 2023-07-25 09:52:46 -04:00
coalesce_test.go Fix multiple bugs in values handling 2023-06-26 11:37:21 -04:00
compatible.go Update dependencies 2019-10-03 13:49:07 -04:00
compatible_test.go ref(*): Moves packages to internal 2019-08-09 16:02:33 -06:00
create.go update autoscaling/v2beta1 to autoscaling/v2 in skeleton chart 2023-05-05 13:59:11 +08:00
create_test.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
dependencies.go Fix multiple bugs in values handling 2023-06-26 11:37:21 -04:00
dependencies_test.go Updated per feedback from gjenkins8 2023-07-25 09:52:46 -04:00
doc.go Bump the Go version 2023-03-22 11:29:26 -04:00
errors.go Fix chartutils/errors.go stack overflow 2019-10-15 15:03:36 -07:00
errors_test.go Spelling (#7258) 2019-12-18 12:04:08 +00:00
expand.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
expand_test.go test: use T.TempDir to create temporary test directory 2022-02-12 13:54:54 +08:00
jsonschema.go Update schema validation handling 2022-10-21 18:04:05 +01:00
jsonschema_test.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
save.go Fix issue with unhandled error on Stat 2020-05-22 12:04:37 -04:00
save_test.go test: replace ensure.TempDir with t.TempDir 2023-07-29 16:11:22 +08:00
validate_name.go Replace golint with revive 2022-01-20 15:19:40 +00:00
validate_name_test.go refactor the release name validation to be consistent across Helm 2020-09-17 11:34:31 -06:00
values.go Updating the Go version in go.mod 2023-03-22 11:52:30 -04:00
values_test.go Spelling (#7258) 2019-12-18 12:04:08 +00:00