Commit 0451a1ba authored by Aaron Jacobs's avatar Aaron Jacobs

FlushFSTest.FsyncError

parent 2f3b25c1
...@@ -408,5 +408,22 @@ func (t *FlushFSTest) FsyncReports() { ...@@ -408,5 +408,22 @@ func (t *FlushFSTest) FsyncReports() {
} }
func (t *FlushFSTest) FsyncError() { func (t *FlushFSTest) FsyncError() {
AssertTrue(false, "TODO") // Open the file.
f, err := os.OpenFile(path.Join(t.Dir, "foo"), os.O_RDWR, 0)
AssertEq(nil, err)
defer func() {
if f != nil {
ExpectEq(nil, f.Close())
}
}()
// Configure an fsync error.
t.setFsyncError(fuse.ENOENT)
// Fsync.
err = f.Sync()
AssertNe(nil, err)
ExpectThat(err, Error(HasSubstr("TODO")))
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment