mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 10:54:48 +08:00
vfstest: fix crash if open failed
This commit is contained in:
parent
c1a98768bc
commit
67d4394a37
|
@ -15,7 +15,7 @@ func TestWriteFileNoWrite(t *testing.T) {
|
|||
run.skipIfNoFUSE(t)
|
||||
|
||||
fd, err := osCreate(run.path("testnowrite"))
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = fd.Close()
|
||||
assert.NoError(t, err)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"github.com/rclone/rclone/vfs/vfscommon"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
@ -20,7 +21,7 @@ func TestWriteFileDoubleClose(t *testing.T) {
|
|||
}
|
||||
|
||||
out, err := osCreate(run.path("testdoubleclose"))
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
fd := out.Fd()
|
||||
|
||||
fd1, err := unix.Dup(int(fd))
|
||||
|
|
Loading…
Reference in New Issue
Block a user