-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dav unit tests #3441
Dav unit tests #3441
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
d340664
to
4e5722e
Compare
4e5722e
to
a91cc7a
Compare
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@@ -226,6 +227,13 @@ func NewWith(conf *Config, fm favorite.Manager, ls LockSystem, _ *zerolog.Logger | |||
if err := s.davHandler.init(conf); err != nil { | |||
return nil, err | |||
} | |||
if gwc == nil { | |||
var err error | |||
s.gwClient, err = pool.GetGatewayServiceClient(s.c.GatewaySvc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving this default behavior into New
and just erroring out in here if the given client is nil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have to duplicate it to pkg/micro/ocdav/service.go
as well, otherwise we would change the behavior of the micro ocdav service, requiring a major version bump. So I put the fallback here, to make passing in a gwclient optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
We added unit tests to cover more ocdav handlers:
part of owncloud/ocis#5022