mirror of
https://github.com/restic/restic.git
synced 2025-08-13 22:57:44 +00:00
fs/reader: test file not exist case
This commit is contained in:
@@ -96,6 +96,13 @@ func createFileTest(filename string, now time.Time, data []byte) fsTest {
|
||||
verifyFileContentOpenFile(t, fs, filename, data)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "file/Open-error-not-exist",
|
||||
f: func(t *testing.T, fs FS) {
|
||||
_, err := fs.OpenFile(filename+"/other", O_RDONLY, false)
|
||||
test.Assert(t, errors.Is(err, os.ErrNotExist), "unexpected error, got %v, expected %v", err, os.ErrNotExist)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "file/Lstat",
|
||||
f: func(t *testing.T, fs FS) {
|
||||
|
Reference in New Issue
Block a user