vfs: add flags parameter to Dir.Create
This commit is contained in:
parent
517bdc719b
commit
a80d8a21dc
5 changed files with 6 additions and 6 deletions
|
@ -281,7 +281,7 @@ func TestDirCreate(t *testing.T) {
|
|||
defer r.Finalise()
|
||||
vfs, dir, _ := dirCreate(t, r)
|
||||
|
||||
file, err := dir.Create("potato")
|
||||
file, err := dir.Create("potato", os.O_WRONLY|os.O_CREATE)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, int64(0), file.Size())
|
||||
|
||||
|
@ -306,7 +306,7 @@ func TestDirCreate(t *testing.T) {
|
|||
assert.Equal(t, int64(5), file2.Size())
|
||||
|
||||
vfs.Opt.ReadOnly = true
|
||||
_, err = dir.Create("sausage")
|
||||
_, err = dir.Create("sausage", os.O_WRONLY|os.O_CREATE)
|
||||
assert.Equal(t, EROFS, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue