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

Extend integration tests for "files:transfer-ownership" command #22761

Conversation

danxuliu
Copy link
Member

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 ;-) ).

The integration tests did not verify that the files were actually
transferred between the users, only that the files were downloadable.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The integration tests did not verify that the shares were actually
transferred between the users (or that they were removed due to being
transferred to the sharee).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Currently only transferring ownership of a reshare with a group to a
user in the group is possible.

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).

The added integration tests reflect the above behaviours.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@juliushaertl
Copy link
Member

I didn't found any time to look into this yet so I'd say let's get the fancy new tests in for now and I'll tackle the other bug with #22803

@juliushaertl juliushaertl added 3. to review Waiting for reviews enhancement and removed 2. developing Work in progress labels Sep 11, 2020
@juliushaertl juliushaertl removed their assignment Sep 11, 2020
@MorrisJobke MorrisJobke merged commit 1c9a898 into master Sep 14, 2020
@MorrisJobke MorrisJobke deleted the extend-integration-tests-for-files-transfer-ownership-command branch September 14, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants