Commit 8aecb355 authored by Aaron Jacobs's avatar Aaron Jacobs

ErrorFSTest.OpenFile

parent e1bfc500
...@@ -15,11 +15,17 @@ ...@@ -15,11 +15,17 @@
package errorfs_test package errorfs_test
import ( import (
"os"
"path"
"reflect"
"syscall"
"testing" "testing"
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/fuseutil" "github.com/jacobsa/fuse/fuseutil"
"github.com/jacobsa/fuse/samples" "github.com/jacobsa/fuse/samples"
"github.com/jacobsa/fuse/samples/errorfs" "github.com/jacobsa/fuse/samples/errorfs"
. "github.com/jacobsa/oglematchers"
. "github.com/jacobsa/ogletest" . "github.com/jacobsa/ogletest"
) )
...@@ -57,7 +63,10 @@ func (t *ErrorFSTest) SetUp(ti *TestInfo) { ...@@ -57,7 +63,10 @@ func (t *ErrorFSTest) SetUp(ti *TestInfo) {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
func (t *ErrorFSTest) OpenFile() { func (t *ErrorFSTest) OpenFile() {
AssertTrue(false, "TODO") t.fs.SetError(reflect.TypeOf(&fuseops.OpenFileOp{}), syscall.EOWNERDEAD)
_, err := os.Open(path.Join(t.Dir, "foo"))
ExpectThat(err, Error(HasSubstr("TODO")))
} }
func (t *ErrorFSTest) ReadFile() { func (t *ErrorFSTest) ReadFile() {
......
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