Skip to content

Commit

Permalink
Int test for share owner change on move
Browse files Browse the repository at this point in the history
Added tests to verify share owner change when moving the parent of a
subshare in and out of a received share.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 committed Apr 1, 2022
1 parent 32b3722 commit 71406c6
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions build/integration/sharing_features/sharing-v1-part3.feature
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,54 @@ Feature: sharing
Then as "user1" the file "/shared/shared_file.txt" exists
And as "user0" the file "/shared/shared_file.txt" exists

Scenario: Owner of subshares is adjusted after moving into received share
Given As an "admin"
And user "user0" exists
And user "user1" exists
And user "user2" exists
And user "user0" created a folder "/shared"
And folder "/shared" of user "user0" is shared with user "user1"
And user "user1" accepts last share
And user "user1" created a folder "/movein"
And user "user1" created a folder "/movein/subshare"
When As an "user1"
And folder "/movein" of user "user1" is shared with user "user2"
And save last share id
Then Getting info of last share
And Share fields of last share match with
| uid_file_owner | user1 |
| share_with | user2 |
When User "user1" moved file "/movein" to "/shared/movein"
Then As an "user0"
And Getting info of last share
And Share fields of last share match with
| uid_file_owner | user0 |
| share_with | user2 |

Scenario: Owner of subshares is adjusted after moving out of received share
Given As an "admin"
And user "user0" exists
And user "user1" exists
And user "user2" exists
And user "user0" created a folder "/shared"
And user "user0" created a folder "/shared/moveout"
And user "user0" created a folder "/shared/moveout/subshare"
And folder "/shared" of user "user0" is shared with user "user1"
And user "user1" accepts last share
And As an "user1"
And folder "/shared/moveout/subshare" of user "user1" is shared with user "user2"
And save last share id
When As an "user1"
Then Getting info of last share
And Share fields of last share match with
| uid_file_owner | user0 |
| share_with | user2 |
When User "user1" moved file "/shared/moveout" to "/moveout"
Then Getting info of last share
And Share fields of last share match with
| uid_file_owner | user1 |
| share_with | user2 |

Scenario: Link shares inside of group shares keep their original data when the root share is updated
Given As an "admin"
And user "user0" exists
Expand Down

0 comments on commit 71406c6

Please sign in to comment.