Skip to content
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

Merged
merged 3 commits into from
Nov 10, 2022
Merged

Dav unit tests #3441

merged 3 commits into from
Nov 10, 2022

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Nov 9, 2022

We added unit tests to cover more ocdav handlers:

  • delete, increases coverage from 3.1% to 9.8%

part of owncloud/ocis#5022

@update-docs
Copy link

update-docs bot commented Nov 9, 2022

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.

@butonic butonic changed the base branch from master to edge November 9, 2022 13:38
@butonic butonic marked this pull request as draft November 9, 2022 13:39
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic marked this pull request as ready for review November 9, 2022 15:49
@butonic butonic self-assigned this Nov 9, 2022
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@@ -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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@butonic butonic merged commit d2df5a9 into cs3org:edge Nov 10, 2022
@butonic butonic deleted the dav-unit-tests branch November 10, 2022 09:56
@kobergj kobergj mentioned this pull request Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants