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

@@ -12,7 +12,8 @@ import (
)
func mockNewFs(t *testing.T) func() {
f := mockfs.NewFs(context.Background(), "mock", "mock")
f, err := mockfs.NewFs(context.Background(), "mock", "mock", nil)
require.NoError(t, err)
cache.Put("/", f)
cache.Put("mock:/", f)
cache.Put(":mock:/", f)