Skip to content

Commit 8e50698

Browse files
committed
test: add test for delayed share validate
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 0adc158 commit 8e50698

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

build/integration/features/bootstrap/SharingContext.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ protected function resetAppConfigs() {
3232
$this->deleteServerConfig('core', 'shareapi_allow_federation_on_public_shares');
3333
$this->deleteServerConfig('files_sharing', 'outgoing_server2server_share_enabled');
3434
$this->deleteServerConfig('core', 'shareapi_allow_view_without_download');
35+
$this->deleteServerConfig('files_sharing', 'update_single_cutoff');
36+
$this->deleteServerConfig('files_sharing', 'update_all_cutoff');
3537

3638
$this->runOcc(['config:system:delete', 'share_folder']);
3739
}

build/integration/sharing_features/sharing-v1-part2.feature

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,50 @@ Feature: sharing
4747
| share_with | user2 |
4848
| share_with_displayname | user2 |
4949

50+
Scenario: getting all shares of a file with a received share after revoking the resharing rights with delayed share check
51+
Given user "user0" exists
52+
And parameter "update_single_cutoff" of app "files_sharing" is set to "0"
53+
And parameter "update_all_cutoff" of app "files_sharing" is set to "0"
54+
And user "user1" exists
55+
And user "user2" exists
56+
And file "textfile0.txt" of user "user1" is shared with user "user0"
57+
And user "user0" accepts last share
58+
And Updating last share with
59+
| permissions | 1 |
60+
And file "textfile0.txt" of user "user1" is shared with user "user2"
61+
When As an "user0"
62+
And sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=/textfile0 (2).txt"
63+
Then the list of returned shares has 1 shares
64+
And share 0 is returned with
65+
| share_type | 0 |
66+
| uid_owner | user1 |
67+
| displayname_owner | user1 |
68+
| path | /textfile0 (2).txt |
69+
| item_type | file |
70+
| mimetype | text/plain |
71+
| storage_id | shared::/textfile0 (2).txt |
72+
| file_target | /textfile0.txt |
73+
| share_with | user2 |
74+
| share_with_displayname | user2 |
75+
# After user2 does an FS setup the share is renamed
76+
When As an "user2"
77+
And Downloading file "/textfile0 (2).txt" with range "bytes=10-18"
78+
Then Downloaded content should be "test text"
79+
When As an "user0"
80+
And sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=/textfile0 (2).txt"
81+
Then the list of returned shares has 1 shares
82+
And share 0 is returned with
83+
| share_type | 0 |
84+
| uid_owner | user1 |
85+
| displayname_owner | user1 |
86+
| path | /textfile0 (2).txt |
87+
| item_type | file |
88+
| mimetype | text/plain |
89+
| storage_id | shared::/textfile0 (2).txt |
90+
| file_target | /textfile0 (2).txt |
91+
| share_with | user2 |
92+
| share_with_displayname | user2 |
93+
5094
Scenario: getting all shares of a file with a received share also reshared after revoking the resharing rights
5195
Given user "user0" exists
5296
And user "user1" exists

0 commit comments

Comments
 (0)