fix: add comment and fix unit tests

This commit is contained in:
Juan Pablo Villafáñez
2024-06-21 10:51:04 +02:00
parent 7360cd115e
commit d175317295
2 changed files with 5 additions and 2 deletions
@@ -500,6 +500,9 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (fileinfo.FileInfo, e
return nil, NewConnectorError(500, statRes.GetStatus().GetCode().String()+" "+statRes.GetStatus().GetMessage())
}
// If a not known app name is used, consider "Microsoft" as default.
// This will help with the CI because we're using a "FakeOffice" app
// for the wopi validator, which requires a Microsoft fileinfo
var info fileinfo.FileInfo
switch strings.ToLower(f.cfg.App.Name) {
case "collabora":
@@ -840,7 +840,7 @@ var _ = Describe("FileConnector", func() {
}, nil)
// change wopi app provider
cfg.WopiApp.Provider = "Collabora"
cfg.App.Name = "Collabora"
expectedFileInfo := &fileinfo.Collabora{
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
@@ -893,7 +893,7 @@ var _ = Describe("FileConnector", func() {
}, nil)
// change wopi app provider
cfg.WopiApp.Provider = "Collabora"
cfg.App.Name = "Collabora"
expectedFileInfo := &fileinfo.Collabora{
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp