Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 21, 2024
1 parent df1b842 commit 2487c82
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion pkg/storage/fs/ocis/ocis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/cs3org/reva/v2/pkg/storage/fs/ocis"
"github.com/cs3org/reva/v2/tests/helpers"
"github.com/rs/zerolog"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -53,7 +54,7 @@ var _ = Describe("Ocis", func() {

Describe("New", func() {
It("returns a new instance", func() {
_, err := ocis.New(options, nil, nil)
_, err := ocis.New(options, nil, &zerolog.Logger{})
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
3 changes: 2 additions & 1 deletion pkg/storage/fs/posix/posix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/cs3org/reva/v2/pkg/storage/fs/posix"
"github.com/cs3org/reva/v2/tests/helpers"
"github.com/rs/zerolog"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -56,7 +57,7 @@ var _ = Describe("Posix", func() {

Describe("New", func() {
It("returns a new instance", func() {
_, err := posix.New(options, nil, nil)
_, err := posix.New(options, nil, &zerolog.Logger{})
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/fs/posix/testhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func NewTestEnv(config map[string]interface{}) (*TestEnv, error) {
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
Trashbin: tb,
}
fs, err := decomposedfs.New(&o.Options, aspects)
fs, err := decomposedfs.New(&o.Options, aspects, &logger)
if err != nil {
return nil, err
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/storage/fs/s3ng/s3ng_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/cs3org/reva/v2/pkg/storage/fs/s3ng"
"github.com/cs3org/reva/v2/tests/helpers"
"github.com/rs/zerolog"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -58,12 +59,12 @@ var _ = Describe("S3ng", func() {

Describe("New", func() {
It("fails on missing s3 configuration", func() {
_, err := s3ng.New(map[string]interface{}{}, nil, nil)
_, err := s3ng.New(map[string]interface{}{}, nil, &zerolog.Logger{})
Expect(err).To(MatchError("S3 configuration incomplete"))
})

It("works with complete configuration", func() {
_, err := s3ng.New(options, nil, nil)
_, err := s3ng.New(options, nil, &zerolog.Logger{})
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
3 changes: 2 additions & 1 deletion pkg/storage/utils/decomposedfs/testhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/cs3org/reva/v2/pkg/store"
"github.com/google/uuid"
"github.com/rs/zerolog"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"

Expand Down Expand Up @@ -178,7 +179,7 @@ func NewTestEnv(config map[string]interface{}) (*TestEnv, error) {
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
Trashbin: &decomposedfs.DecomposedfsTrashbin{},
}
fs, err := decomposedfs.New(o, aspects)
fs, err := decomposedfs.New(o, aspects, &zerolog.Logger{})
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/storage/utils/decomposedfs/upload_async_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/cs3org/reva/v2/pkg/store"
"github.com/cs3org/reva/v2/pkg/utils"
"github.com/cs3org/reva/v2/tests/helpers"
"github.com/rs/zerolog"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"

Expand Down Expand Up @@ -180,7 +181,7 @@ var _ = Describe("Async file uploads", Ordered, func() {
EventStream: stream.Chan{pub, con},
Trashbin: &DecomposedfsTrashbin{},
}
fs, err = New(o, aspects)
fs, err = New(o, aspects, &zerolog.Logger{})
Expect(err).ToNot(HaveOccurred())

resp, err := fs.CreateStorageSpace(ctx, &provider.CreateStorageSpaceRequest{Owner: user, Type: "personal"})
Expand Down
3 changes: 2 additions & 1 deletion pkg/storage/utils/decomposedfs/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/cs3org/reva/v2/pkg/store"
"github.com/cs3org/reva/v2/tests/helpers"
"github.com/rs/zerolog"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"

Expand Down Expand Up @@ -144,7 +145,7 @@ var _ = Describe("File uploads", func() {
Permissions: permissions.NewPermissions(pmock, permissionsSelector),
Trashbin: &decomposedfs.DecomposedfsTrashbin{},
}
fs, err = decomposedfs.New(o, aspects)
fs, err = decomposedfs.New(o, aspects, &zerolog.Logger{})
Expect(err).ToNot(HaveOccurred())

resp, err := fs.CreateStorageSpace(ctx, &provider.CreateStorageSpaceRequest{Owner: user, Type: "personal"})
Expand Down

0 comments on commit 2487c82

Please sign in to comment.