ErrorFSTest.OpenFile

geesefs-0-30-9
Aaron Jacobs 2015-08-04 08:31:51 +10:00
parent e1bfc5006b
commit 8aecb35541
1 changed files with 10 additions and 1 deletions

View File

@ -15,11 +15,17 @@
package errorfs_test
import (
"os"
"path"
"reflect"
"syscall"
"testing"
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/fuseutil"
"github.com/jacobsa/fuse/samples"
"github.com/jacobsa/fuse/samples/errorfs"
. "github.com/jacobsa/oglematchers"
. "github.com/jacobsa/ogletest"
)
@ -57,7 +63,10 @@ func (t *ErrorFSTest) SetUp(ti *TestInfo) {
////////////////////////////////////////////////////////////////////////
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() {