mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-01 16:30:02 -05:00
fix unit tests
This commit is contained in:
@@ -586,7 +586,7 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
|
|||||||
}
|
}
|
||||||
|
|
||||||
webURL.Path = path.Join(webURL.Path, "f", storagespace.FormatResourceID(spaceRid))
|
webURL.Path = path.Join(webURL.Path, "f", storagespace.FormatResourceID(spaceRid))
|
||||||
drive.Root.WebUrl = libregraph.PtrString(webURL.String())
|
drive.WebUrl = libregraph.PtrString(webURL.String())
|
||||||
|
|
||||||
if space.Owner != nil && space.Owner.Id != nil {
|
if space.Owner != nil && space.Owner.Id != nil {
|
||||||
drive.Owner = &libregraph.IdentitySet{
|
drive.Owner = &libregraph.IdentitySet{
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
libregraph "github.com/owncloud/libre-graph-api-go"
|
libregraph "github.com/owncloud/libre-graph-api-go"
|
||||||
|
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||||
"github.com/owncloud/ocis/v2/services/graph/mocks"
|
"github.com/owncloud/ocis/v2/services/graph/mocks"
|
||||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
||||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults"
|
"github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults"
|
||||||
@@ -39,6 +40,8 @@ var _ = Describe("Graph", func() {
|
|||||||
cfg = defaults.FullDefaultConfig()
|
cfg = defaults.FullDefaultConfig()
|
||||||
cfg.Identity.LDAP.CACert = "" // skip the startup checks, we don't use LDAP at all in this tests
|
cfg.Identity.LDAP.CACert = "" // skip the startup checks, we don't use LDAP at all in this tests
|
||||||
cfg.TokenManager.JWTSecret = "loremipsum"
|
cfg.TokenManager.JWTSecret = "loremipsum"
|
||||||
|
cfg.Commons = &shared.Commons{}
|
||||||
|
cfg.Commons.OcisURL = "https://ocis.test"
|
||||||
|
|
||||||
gatewayClient = &mocks.GatewayClient{}
|
gatewayClient = &mocks.GatewayClient{}
|
||||||
eventsPublisher = mocks.Publisher{}
|
eventsPublisher = mocks.Publisher{}
|
||||||
@@ -108,7 +111,8 @@ var _ = Describe("Graph", func() {
|
|||||||
"root":{
|
"root":{
|
||||||
"id":"pro-1$sameID",
|
"id":"pro-1$sameID",
|
||||||
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$sameID"
|
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$sameID"
|
||||||
}
|
},
|
||||||
|
"webUrl": "https://ocis.test/f/pro-1$sameID"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -178,7 +182,8 @@ var _ = Describe("Graph", func() {
|
|||||||
"eTag":"101112131415",
|
"eTag":"101112131415",
|
||||||
"id":"pro-1$asameID",
|
"id":"pro-1$asameID",
|
||||||
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$asameID"
|
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$asameID"
|
||||||
}
|
},
|
||||||
|
"webUrl": "https://ocis.test/f/pro-1$asameID"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"driveAlias":"bspacetype/bspacename",
|
"driveAlias":"bspacetype/bspacename",
|
||||||
@@ -189,7 +194,8 @@ var _ = Describe("Graph", func() {
|
|||||||
"eTag":"123456789",
|
"eTag":"123456789",
|
||||||
"id":"pro-1$bsameID",
|
"id":"pro-1$bsameID",
|
||||||
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$bsameID"
|
"webDavUrl":"https://localhost:9200/dav/spaces/pro-1$bsameID"
|
||||||
}
|
},
|
||||||
|
"webUrl": "https://ocis.test/f/pro-1$bsameID"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user