Commit graph

8 commits

Author SHA1 Message Date
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
Matt Farina
4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
guofutan
04e79e936d fix: fix args name in postrender/exec_test.go and error if order in postRendererArgsSlice
Signed-off-by: guofutan <guofutan@tencent.com>
2022-01-22 11:46:30 +08:00
guofutan
d12170b3f2 fix: change postRendererArgs to Slice Type and use args...
Signed-off-by: guofutan <guofutan@tencent.com>
2022-01-22 11:46:29 +08:00
guofutan
44423fb2ca fix: keep the API: postrender.NewExec and Add NewExecWithArgs
Signed-off-by: guofutan <guofutan@tencent.com>
2022-01-22 11:46:29 +08:00
guofutan
46222c5c00 fea(#10511): add --post-renderer-args to support assign args to PostRenderer exec
Signed-off-by: guofutan <guofutan@tencent.com>
2022-01-21 20:43:32 +08:00
Taylor Thomas
cf7a02fac7 chore(*): Removes support for searching the plugin dir
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2020-02-07 10:29:59 -07:00
Taylor Thomas
7a3049a418 chore(postrender): Adds unit tests for exec post renderer
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2020-02-07 10:29:59 -07:00