fleet/orbit/pkg/update
Eng Zer Jun abe33f1d8d
test: use T.TempDir to create temporary test directory (#6080)
This commit replaces `ioutil.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 `ioutil.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>
2022-06-13 10:20:38 -03:00
..
badgerstore Update go-tuf dependency (#3837) 2022-02-10 08:16:36 -08:00
filestore test: use T.TempDir to create temporary test directory (#6080) 2022-06-13 10:20:38 -03:00
file.go Add 'orbit/' from commit 'ab3047bb39f1e2be331d1ff18b4eb768619033c4' 2021-08-04 16:58:25 -03:00
hash.go Fix update checks for orbit at startup (#3835) 2022-02-23 14:58:07 -03:00
hash_test.go Fix update checks for orbit at startup (#3835) 2022-02-23 14:58:07 -03:00
options.go Add (beta) support for Fleet Desktop to linux (#5221) 2022-05-04 11:14:12 -03:00
options_darwin.go fix SELinux issue (#5335) 2022-05-02 12:18:59 -06:00
options_linux.go fix SELinux issue (#5335) 2022-05-02 12:18:59 -06:00
options_windows.go Fleetctl to package .app bundles for osquery (and changes for orbit to support them) (#4393) 2022-03-15 16:04:12 -03:00
runner.go Orbit: Add early update checks before starting sub-systems (#5885) 2022-06-01 14:47:04 -03:00
runner_test.go Do not use golangci action for better reproducibility (use make lint-go) (#6175) 2022-06-10 18:52:24 -03:00
update.go Orbit: Add early update checks before starting sub-systems (#5885) 2022-06-01 14:47:04 -03:00
update_test.go Orbit: Add early update checks before starting sub-systems (#5885) 2022-06-01 14:47:04 -03:00