Skip to content

Commit

Permalink
update spaces registry test
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Dec 9, 2021
1 parent a2d55c7 commit 4f354c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion changelog/unreleased/spaces-registry-allow-list-all.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Enhancement: allow listing all storage spaces

To implement the drives api we allow listing all spaces by sending a spaceid `*!*`. This is a workaround until a proper filter to list all storage spaces a user has access to / can manage is implemented, or we make that the implicit default filter.
To implement the drives api we now listing all spaces when no filter is given. The Provider info will not contain any spaces as the client is responsible for looking up the spaces.

https://github.com/cs3org/reva/pull/2344
6 changes: 3 additions & 3 deletions pkg/storage/registry/spaces/spaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
. "github.com/onsi/gomega"
)

var _ = Describe("Static", func() {
var _ = Describe("Spaces", func() {
var (
handler storage.Registry
ctxAlice context.Context
Expand Down Expand Up @@ -278,11 +278,11 @@ var _ = Describe("Static", func() {
})

Describe("ListProviders", func() {
It("returns an empty list when no filters are set", func() {
It("returns all providers when no filter is set", func() {
filters := map[string]string{}
providers, err := handler.ListProviders(ctxAlice, filters)
Expect(err).ToNot(HaveOccurred())
Expect(len(providers)).To(Equal(0))
Expect(len(providers)).To(Equal(3))
})

It("filters by path", func() {
Expand Down

0 comments on commit 4f354c2

Please sign in to comment.