Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Jul 26, 2024
1 parent ba3349e commit 0bcee4a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/storage/utils/decomposedfs/decomposedfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ func New(o *options.Options, aspects aspects.Aspects) (storage.FS, error) {
return nil, err
}

if aspects.Trashbin == nil {
return nil, errors.New("need trashbin")
}
// set a null usermapper if we don't have one
if aspects.UserMapper == nil {
aspects.UserMapper = &usermapper.NullMapper{}
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/utils/decomposedfs/testhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func NewTestEnv(config map[string]interface{}) (*TestEnv, error) {
Lookup: lu,
Tree: tree,
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
Trashbin: &decomposedfs.DecomposedfsTrashbin{},
}
fs, err := decomposedfs.New(o, aspects)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/utils/decomposedfs/upload_async_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ var _ = Describe("Async file uploads", Ordered, func() {
Tree: tree,
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
EventStream: stream.Chan{pub, con},
Trashbin: &DecomposedfsTrashbin{},
}
fs, err = New(o, aspects)
Expect(err).ToNot(HaveOccurred())
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/utils/decomposedfs/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var _ = Describe("File uploads", func() {
Lookup: lu,
Tree: tree,
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
Trashbin: &decomposedfs.DecomposedfsTrashbin{},
}
fs, err = decomposedfs.New(o, aspects)
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit 0bcee4a

Please sign in to comment.