mockfs: make it so it can be registered as an Fs

This commit is contained in:
Nick Craig-Wood
2023-04-28 12:01:04 +01:00
parent 335ca6d572
commit 6b670bd439
7 changed files with 40 additions and 12 deletions

View File

@@ -19,9 +19,11 @@ import (
func TestDoMultiThreadCopy(t *testing.T) {
ctx := context.Background()
ci := fs.GetConfig(ctx)
f := mockfs.NewFs(ctx, "potato", "")
f, err := mockfs.NewFs(ctx, "potato", "", nil)
require.NoError(t, err)
src := mockobject.New("file.txt").WithContent([]byte(random.String(100)), mockobject.SeekModeNone)
srcFs := mockfs.NewFs(ctx, "sausage", "")
srcFs, err := mockfs.NewFs(ctx, "sausage", "", nil)
require.NoError(t, err)
src.SetFs(srcFs)
oldStreams := ci.MultiThreadStreams