Commit Graph

11 Commits

Author SHA1 Message Date
justinsb 6c2edaee7e Add Context arg to vfs ReadFile
This is an "action" method, so should take a context.
2023-01-01 09:51:44 -05:00
justinsb ae074bbc6b VFS: Add context to CreateFile & WriteFile
As "request" methods, these should have context parameters.
2022-12-23 10:39:52 -05:00
Eng Zer Jun deede3ecd4
test: use `T.TempDir` to create temporary test directory
The directory created by `T.TempDir` 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-02-18 16:57:41 +08:00
Eng Zer Jun 425173ae9f
refactor: 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-11-12 15:37:18 +08:00
Zhou Hao d6695b822f Add err judgment to os.RemoveAll
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-07-09 16:48:35 +08:00
Zhou Hao 34931ed930 Add err judgment to ioutil.TempDir
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-07-09 16:45:12 +08:00
Li Zhijian c3fc293ede cleanup tempfiles for fs_test
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-07-02 10:09:34 +08:00
Lu Fengqi f7990cad35 util/pkg/vfs/fs.go: Add Unit Test for WriteTo
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
2020-04-27 17:46:07 +08:00
tiendc ce134f71b9
Update fs_test.go 2020-03-09 15:45:12 +07:00
tiendc 293233248c
Update fs_test.go
Update fs_test.go
2020-03-09 15:32:03 +07:00
Dao Cong Tien b95a24d43e Add UT for util/pkg/vfs/fs.go
Signed-off-by: Dao Cong Tien <tiendc@vn.fujitsu.com>
2020-03-06 13:43:24 +07:00