fix: adjust tests for the new config option

This commit is contained in:
Juan Pablo Villafáñez
2024-11-05 13:20:28 +01:00
parent 1e8b5fae70
commit ff8d674666
3 changed files with 9 additions and 0 deletions

View File

@@ -2935,14 +2935,17 @@ def wopiCollaborationService(name):
if name == "collabora":
environment["COLLABORATION_APP_NAME"] = "Collabora"
environment["COLLABORATION_APP_PRODUCT"] = "Collabora"
environment["COLLABORATION_APP_ADDR"] = "https://collabora:9980"
environment["COLLABORATION_APP_ICON"] = "https://collabora:9980/favicon.ico"
elif name == "onlyoffice":
environment["COLLABORATION_APP_NAME"] = "OnlyOffice"
environment["COLLABORATION_APP_PRODUCT"] = "OnlyOffice"
environment["COLLABORATION_APP_ADDR"] = "https://onlyoffice"
environment["COLLABORATION_APP_ICON"] = "https://onlyoffice/web-apps/apps/documenteditor/main/resources/img/favicon.ico"
elif name == "fakeoffice":
environment["COLLABORATION_APP_NAME"] = "FakeOffice"
environment["COLLABORATION_APP_PRODUCT"] = "Microsoft"
environment["COLLABORATION_APP_ADDR"] = "http://fakeoffice:8080"
environment["COLLABORATION_WOPI_SRC"] = "http://%s:9300" % service_name

View File

@@ -48,6 +48,7 @@ var _ = Describe("FileConnector", func() {
App: config.App{
LockName: "testName_for_unittests", // Only the LockName is used
Name: "test",
Product: "Microsoft",
},
Wopi: config.Wopi{
WopiSrc: "https://ocis.server.prv",
@@ -1761,6 +1762,7 @@ var _ = Describe("FileConnector", func() {
// change wopi app provider
cfg.App.Name = "Collabora"
cfg.App.Product = "Collabora"
expectedFileInfo := &fileinfo.Collabora{
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
@@ -1834,6 +1836,7 @@ var _ = Describe("FileConnector", func() {
// change wopi app provider
cfg.App.Name = "Collabora"
cfg.App.Product = "Collabora"
expectedFileInfo := &fileinfo.Collabora{
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
@@ -1921,6 +1924,7 @@ var _ = Describe("FileConnector", func() {
// change wopi app provider
cfg.App.Name = "OnlyOffice"
cfg.App.Product = "OnlyOffice"
response, err := fc.CheckFileInfo(ctx)
Expect(err).ToNot(HaveOccurred())

View File

@@ -147,6 +147,7 @@ var _ = Describe("Discovery", func() {
cfg.Wopi.Secret = "my_supa_secret"
cfg.Wopi.DisableChat = disableChat
cfg.App.Name = appName
cfg.App.Product = appName
myself := &userv1beta1.User{
Id: &userv1beta1.UserId{
@@ -333,6 +334,7 @@ var _ = Describe("Discovery", func() {
cfg.Wopi.WopiSrc = "htttps://wopiserver.test.prv"
cfg.Wopi.Secret = "my_supa_secret"
cfg.App.Name = "OnlyOffice"
cfg.App.Product = "OnlyOffice"
myself := &userv1beta1.User{
Id: &userv1beta1.UserId{