fix: add comment and fix unit tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user