7 Commits

Author SHA1 Message Date
Benjamin Wang
47d460b8dc add verification on nil log
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-13 17:11:36 +08:00
Benjamin Wang
f6cfd465cc No need to manually remove tmp directory created by t.TempDir()
The temporary directory created by t.TempDir() can be automatically removed by
the golang testing utilities. So no need to remove it manually.

FYI.

    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L911-L915
    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L957

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 08:20:52 +08:00
Eng Zer Jun
e9edc5432c
*: use T.TempDir to create temporary test directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-25 00:00:46 +08:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Aleksandr Razumov
3644c9d67b
client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
Also populate it to every invocation.
2021-10-07 17:53:59 +03:00
pyiyun
28a490b09c etcdserver: remove temp files in snap dir when etcdServer starting
When etcd exits abnormally, tmp files will remain in snap dir, so clean up tmp files in snap dir when etcdserver starting.

Fixes #12837
2021-04-16 20:30:04 +08:00
Piotr Tabor
0b81fdf418 Move pkg/* used by client to client/pkg. 2021-04-05 23:47:27 +02:00