mirror of https://github.com/minio/minio.git
0a3b1ad4eb
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> |
||
---|---|---|
.. | ||
directio_darwin.go | ||
directio_unix.go | ||
directio_unsupported.go | ||
disk.go | ||
disk_test.go | ||
disk_unix.go | ||
disk_windows.go | ||
fdatasync_linux.go | ||
fdatasync_unix.go | ||
fdatasync_unsupported.go | ||
root_disk.go | ||
stat_bsd.go | ||
stat_freebsd.go | ||
stat_linux.go | ||
stat_linux_32bit.go | ||
stat_linux_s390x.go | ||
stat_netbsd.go | ||
stat_openbsd.go | ||
stat_solaris.go | ||
stat_windows.go | ||
type_bsd.go | ||
type_linux.go | ||
type_windows.go |