Fixed FlushFSTest.Dup_FlushError for darwin.
parent
d2445f678d
commit
fef2721042
|
@ -496,12 +496,18 @@ func (t *FlushFSTest) Dup_FlushError() {
|
||||||
// Configure a flush error.
|
// Configure a flush error.
|
||||||
t.setFlushError(fuse.ENOENT)
|
t.setFlushError(fuse.ENOENT)
|
||||||
|
|
||||||
// Close by the first handle.
|
// Close by the first handle. On OS X, where the semantics of file handles
|
||||||
|
// are different (cf. https://github.com/osxfuse/osxfuse/issues/199), this
|
||||||
|
// does not result in an error.
|
||||||
err = t.f1.Close()
|
err = t.f1.Close()
|
||||||
t.f1 = nil
|
t.f1 = nil
|
||||||
|
|
||||||
AssertNe(nil, err)
|
if runtime.GOOS == "darwin" {
|
||||||
ExpectThat(err, Error(HasSubstr("no such file")))
|
AssertEq(nil, err)
|
||||||
|
} else {
|
||||||
|
AssertNe(nil, err)
|
||||||
|
ExpectThat(err, Error(HasSubstr("no such file")))
|
||||||
|
}
|
||||||
|
|
||||||
// Close by the second handle.
|
// Close by the second handle.
|
||||||
err = t.f2.Close()
|
err = t.f2.Close()
|
||||||
|
|
Loading…
Reference in New Issue