Extend integration tests for "files:transfer-ownership" command #22761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request extends the integration tests for the
file:transfer-ownership
command to also check that the files and shares were actually transferred between users (until now they only checked that the files could be downloaded after being transferred).Besides that some extra scenarios were added to check reshares. While doing that I have noticed that currently it is only possible to transfer ownership of a reshare if it is a reshare with a group (or room) and the reshare is transferred to a user in the group (or room).
When transferring ownership of a reshare with another user or with a group to a user not in the group restoring the share fails (but the command succeeds, it only fails for the specific files that are reshares).
When transferring ownership of a path that is a reshare the command fails (as when a specific path is provided the path tries to move the file, it does not take into account reshares).
Note that the above is not related to #22648 (that pull request fixed the transferring ownership of folder reshared with group to a user in the group scenario). The failure when restoring a reshare is caused by
getMountPoint()
being called on a null object. However, even before #21489 it was failing too (in that case it complained that it could not increase permissions).@rullzer @juliushaertl Feel free to either work on the issues or change the pull request state to To review if not being able to transfer reshares is not an issue (or if you prefer to merge this now and work on them later ;-) ).