Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-11-20 17:41:15 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-11-20 17:47:11 +0300
commit54f8f75f6f82ca102b1cfdb88caf0d06e6c9ba31 (patch)
tree814b8e63ae34721af895079b6bc55673189ce911 /build/integration/sharing_features
parent9004e90f5de9a72264425d8a26c88af15f0d27ec (diff)
Accept incoming shares in integration tests
Now all incoming shares need to be explicitly accepted before being able to use the shared file or get information about a reshare (although getting the information of the incoming share is possible before accepting it). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/sharing_features')
-rw-r--r--build/integration/sharing_features/sharing-v1-part2.feature41
-rw-r--r--build/integration/sharing_features/sharing-v1-part3.feature34
-rw-r--r--build/integration/sharing_features/sharing-v1.feature2
3 files changed, 77 insertions, 0 deletions
diff --git a/build/integration/sharing_features/sharing-v1-part2.feature b/build/integration/sharing_features/sharing-v1-part2.feature
index c3f2c8e915e..52fbe73dc9c 100644
--- a/build/integration/sharing_features/sharing-v1-part2.feature
+++ b/build/integration/sharing_features/sharing-v1-part2.feature
@@ -11,6 +11,7 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0 (2).txt" of user "user1" is shared with user "user2"
And As an "user0"
When sending "GET" to "/apps/files_sharing/api/v1/shares?reshares=true&path=textfile0.txt"
@@ -25,6 +26,7 @@ Feature: sharing
And user "user1" exists
And user "user2" exists
And file "textfile0.txt" of user "user1" is shared with user "user0"
+ And user "user0" accepts last share
And Updating last share with
| permissions | 1 |
And file "textfile0.txt" of user "user1" is shared with user "user2"
@@ -49,6 +51,7 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "textfile0.txt" of user "user1" is shared with user "user0"
+ And user "user0" accepts last share
And save the last share data as "textfile0.txt from user1"
And file "textfile0 (2).txt" of user "user0" is shared with user "user3"
And restore the last share data from "textfile0.txt from user1"
@@ -89,8 +92,11 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0 (2).txt" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And file "textfile0 (2).txt" of user "user2" is shared with user "user3"
+ And user "user3" accepts last share
And As an "user1"
When User "user1" deletes file "/textfile0 (2).txt"
And As an "user3"
@@ -155,6 +161,7 @@ Feature: sharing
| displayname_owner | user0 |
| mimetype | text/plain |
And As an "user1"
+ And accepting last share
And Getting info of last share
And the OCS status code should be "100"
And the HTTP status code should be "200"
@@ -215,6 +222,7 @@ Feature: sharing
Given user "user0" exists
And user "user1" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0.txt" of user "user1" is shared with user "user0"
When As an "user0"
And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=/"
@@ -259,7 +267,9 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "PARENT" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And file "CHILD" of user "user2" is shared with user "user3"
When As an "user0"
And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT"
@@ -299,7 +309,9 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "PARENT" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And file "CHILD" of user "user2" is shared with user "user3"
When As an "user1"
And sending "GET" to "/apps/files_sharing/api/v1/shares?subfiles=true&path=PARENT (2)"
@@ -340,7 +352,9 @@ Feature: sharing
And user "user3" exists
And file "PARENT" of user "user0" is shared with user "user1"
And save the last share data as "parent folder"
+ And user "user1" accepts last share
And file "PARENT (2)/CHILD" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And file "CHILD" of user "user2" is shared with user "user3"
And As an "user0"
And restore the last share data from "parent folder"
@@ -369,6 +383,7 @@ Feature: sharing
And user "user1" exists
And user "user2" exists
And file "textfile0.txt" of user "user1" is shared with user "user0"
+ And user "user0" accepts last share
And Updating last share with
| permissions | 1 |
And file "textfile0.txt" of user "user1" is shared with user "user2"
@@ -393,7 +408,9 @@ Feature: sharing
And user "user1" exists
And user "user2" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0.txt" of user "user1" is shared with user "user0"
+ And user "user0" accepts last share
And Updating last share with
| permissions | 1 |
And file "textfile0.txt" of user "user1" is shared with user "user2"
@@ -432,6 +449,7 @@ Feature: sharing
And group "group1" exists
And user "user1" belongs to group "group1"
And file "textfile0.txt" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt"
And As an "user0"
When Updating last share with
@@ -491,6 +509,7 @@ Feature: sharing
And user "user1" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
And file "textfile1.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user1"
When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true&path=textfile1 (2).txt"
Then the OCS status code should be "100"
@@ -501,6 +520,7 @@ Feature: sharing
Given user "user0" exists
And user "user1" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile1.txt" of user "user0" is shared with user "user1"
And As an "user1"
When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true&path=textfile0 (2).txt"
@@ -533,6 +553,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 8 |
And As an "user1"
+ And accepting last share
When creating a share with
| path | /textfile0 (2).txt |
| shareType | 0 |
@@ -553,6 +574,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 16 |
And As an "user1"
+ And accepting last share
When creating a share with
| path | /textfile0 (2).txt |
| shareType | 0 |
@@ -573,6 +595,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 16 |
And As an "user1"
+ And accepting last share
When creating a share with
| path | /PARENT (2) |
| shareType | 0 |
@@ -593,6 +616,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 16 |
And As an "user1"
+ And accepting last share
When creating a share with
| path | /textfile0 (2).txt |
| shareType | 0 |
@@ -636,6 +660,7 @@ Feature: sharing
And user "user1" exists
And user "user2" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0.txt" of user "user0" is shared with user "user2"
And As an "user1"
When Getting info of last share
@@ -668,7 +693,9 @@ Feature: sharing
And group "group0" exists
And user "user1" belongs to group "group0"
And file "/PARENT" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When file "/PARENT/CHILD" of user "user0" is shared with group "group0"
+ And user "user1" accepts last share
Then user "user1" should see following elements
| /FOLDER/ |
| /PARENT/ |
@@ -694,7 +721,10 @@ Feature: sharing
And user "user0" created a folder "/common"
And user "user0" created a folder "/common/sub"
And file "common" of user "user0" is shared with group "group0"
+ And user "user1" accepts last share
+ And user "user2" accepts last share
And file "textfile0.txt" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
And As an "user2"
@@ -715,7 +745,10 @@ Feature: sharing
And user "user0" created a folder "/common"
And user "user0" created a folder "/common/sub"
And file "common" of user "user0" is shared with group "group0"
+ And user "user1" accepts last share
+ And user "user2" accepts last share
And file "textfile0.txt" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
And As an "user2"
@@ -731,6 +764,7 @@ Feature: sharing
And group "group1" exists
And user "user1" belongs to group "group1"
And file "textfile0.txt" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt"
And As an "user0"
And Deleting last share
@@ -764,6 +798,7 @@ Feature: sharing
And user "user1" exists
And user "user2" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0.txt" of user "user0" is shared with user "user2"
And As an "user1"
When Deleting last share
@@ -780,6 +815,8 @@ Feature: sharing
And user "user2" belongs to group "group"
And user "user0" created a folder "/TMP"
And file "TMP" of user "user0" is shared with group "group"
+ And user "user1" accepts last share
+ And user "user2" accepts last share
And user "user1" created a folder "/myFOLDER"
And User "user1" moves file "/TMP" to "/myFOLDER/myTMP"
And user "user2" does not exist
@@ -794,6 +831,7 @@ Feature: sharing
And user "user1" has a quota of "0"
And User "user0" moved file "/welcome.txt" to "/myfile.txt"
And file "myfile.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When User "user1" uploads file "data/textfile.txt" to "/myfile.txt"
Then the HTTP status code should be "204"
@@ -811,6 +849,7 @@ Feature: sharing
And user "user2" exists
And user "user0" created a folder "/TMP"
And file "TMP" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "TMP" of user "user1" is shared with user "user2"
And As an "user1"
When Updating last share with
@@ -830,6 +869,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 21 |
And As an "user1"
+ And accepting last share
And creating a share with
| path | /TMP |
| shareType | 0 |
@@ -853,6 +893,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 21 |
And As an "user1"
+ And accepting last share
And creating a share with
| path | /TMP/SUB |
| shareType | 0 |
diff --git a/build/integration/sharing_features/sharing-v1-part3.feature b/build/integration/sharing_features/sharing-v1-part3.feature
index 42eee1cc3c4..5094111d025 100644
--- a/build/integration/sharing_features/sharing-v1-part3.feature
+++ b/build/integration/sharing_features/sharing-v1-part3.feature
@@ -10,6 +10,7 @@ Feature: sharing
And user "user1" exists
And User "user0" uploads file with content "foo" to "/tmp.txt"
And file "/tmp.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When as "user1" gets properties of folder "/tmp.txt" with
|{http://open-collaboration-services.org/ns}share-permissions |
Then the single response should contain a property "{http://open-collaboration-services.org/ns}share-permissions" with value "19"
@@ -19,6 +20,7 @@ Feature: sharing
And user "user1" exists
And User "user0" uploads file with content "foo" to "/tmp.txt"
And file "tmp.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 3 |
@@ -31,6 +33,7 @@ Feature: sharing
And user "user1" exists
And User "user0" uploads file with content "foo" to "/tmp.txt"
And file "tmp.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 17 |
@@ -50,6 +53,7 @@ Feature: sharing
And user "user1" exists
And user "user0" created a folder "/tmp"
And file "/tmp" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When as "user1" gets properties of folder "/tmp" with
|{http://open-collaboration-services.org/ns}share-permissions |
Then the single response should contain a property "{http://open-collaboration-services.org/ns}share-permissions" with value "31"
@@ -59,6 +63,7 @@ Feature: sharing
And user "user1" exists
And user "user0" created a folder "/tmp"
And file "/tmp" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 29 |
@@ -71,6 +76,7 @@ Feature: sharing
And user "user1" exists
And user "user0" created a folder "/tmp"
And file "/tmp" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 27 |
@@ -83,6 +89,7 @@ Feature: sharing
And user "user1" exists
And user "user0" created a folder "/tmp"
And file "/tmp" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 23 |
@@ -95,6 +102,7 @@ Feature: sharing
And user "user1" exists
And user "user0" created a folder "/tmp"
And file "/tmp" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And As an "user0"
And Updating last share with
| permissions | 15 |
@@ -109,7 +117,9 @@ Feature: sharing
And user "user0" created a folder "/foo"
And user "user1" created a folder "/foo"
When file "/foo" of user "user0" is shared with user "user2"
+ And user "user2" accepts last share
And file "/foo" of user "user1" is shared with user "user2"
+ And user "user2" accepts last share
Then user "user2" should see following elements
| /foo/ |
| /foo%20(2)/ |
@@ -176,7 +186,9 @@ Feature: sharing
And user "user1" belongs to group "group1"
And user "user0" created a folder "/merge-test-outside"
When folder "/merge-test-outside" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And folder "/merge-test-outside" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
Then as "user1" the folder "/merge-test-outside" exists
And as "user1" the folder "/merge-test-outside (2)" does not exist
@@ -188,7 +200,9 @@ Feature: sharing
And user "user1" belongs to group "group1"
And user "user0" created a folder "/merge-test-outside-perms"
When folder "/merge-test-outside-perms" of user "user0" is shared with group "group1" with permissions 1
+ And user "user1" accepts last share
And folder "/merge-test-outside-perms" of user "user0" is shared with user "user1" with permissions 31
+ And user "user1" accepts last share
Then as "user1" gets properties of folder "/merge-test-outside-perms" with
|{http://owncloud.org/ns}permissions|
And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRGDNVCK"
@@ -204,7 +218,9 @@ Feature: sharing
And user "user1" belongs to group "group2"
And user "user0" created a folder "/merge-test-outside-twogroups"
When folder "/merge-test-outside-twogroups" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And folder "/merge-test-outside-twogroups" of user "user0" is shared with group "group2"
+ And user "user1" accepts last share
Then as "user1" the folder "/merge-test-outside-twogroups" exists
And as "user1" the folder "/merge-test-outside-twogroups (2)" does not exist
@@ -218,7 +234,9 @@ Feature: sharing
And user "user1" belongs to group "group2"
And user "user0" created a folder "/merge-test-outside-twogroups-perms"
When folder "/merge-test-outside-twogroups-perms" of user "user0" is shared with group "group1" with permissions 1
+ And user "user1" accepts last share
And folder "/merge-test-outside-twogroups-perms" of user "user0" is shared with group "group2" with permissions 31
+ And user "user1" accepts last share
Then as "user1" gets properties of folder "/merge-test-outside-twogroups-perms" with
|{http://owncloud.org/ns}permissions|
And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRGDNVCK"
@@ -234,8 +252,11 @@ Feature: sharing
And user "user1" belongs to group "group2"
And user "user0" created a folder "/merge-test-outside-twogroups-member-perms"
When folder "/merge-test-outside-twogroups-member-perms" of user "user0" is shared with group "group1" with permissions 1
+ And user "user1" accepts last share
And folder "/merge-test-outside-twogroups-member-perms" of user "user0" is shared with group "group2" with permissions 31
+ And user "user1" accepts last share
And folder "/merge-test-outside-twogroups-member-perms" of user "user0" is shared with user "user1" with permissions 1
+ And user "user1" accepts last share
Then as "user1" gets properties of folder "/merge-test-outside-twogroups-member-perms" with
|{http://owncloud.org/ns}permissions|
And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRGDNVCK"
@@ -289,9 +310,11 @@ Feature: sharing
And user "user1" belongs to group "group1"
And user "user0" created a folder "/merge-test-outside-groups-renamebeforesecondshare"
When folder "/merge-test-outside-groups-renamebeforesecondshare" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And User "user1" moved folder "/merge-test-outside-groups-renamebeforesecondshare" to "/merge-test-outside-groups-renamebeforesecondshare-renamed"
And Sleep for "1" seconds
And folder "/merge-test-outside-groups-renamebeforesecondshare" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
Then as "user1" gets properties of folder "/merge-test-outside-groups-renamebeforesecondshare-renamed" with
|{http://owncloud.org/ns}permissions|
And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRGDNVCK"
@@ -306,9 +329,11 @@ Feature: sharing
And user "user1" belongs to group "group1"
And user "user0" created a folder "/merge-test-outside-groups-renamebeforesecondshare"
When folder "/merge-test-outside-groups-renamebeforesecondshare" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And User "user1" moved folder "/merge-test-outside-groups-renamebeforesecondshare" to "/merge-test-outside-groups-renamebeforesecondshare-renamed"
And Sleep for "1" seconds
And folder "/merge-test-outside-groups-renamebeforesecondshare" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
Then as "user1" gets properties of folder "/merge-test-outside-groups-renamebeforesecondshare-renamed" with
|{http://owncloud.org/ns}permissions|
And the single response should contain a property "{http://owncloud.org/ns}permissions" with value "SRGDNVCK"
@@ -328,6 +353,7 @@ Feature: sharing
And user "user0" created a folder "/common"
And user "user0" created a folder "/common/sub"
And file "/common/sub" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And User "user0" deletes folder "/common"
When User "user0" empties trashbin
Then as "user1" the folder "/sub" does not exist
@@ -354,6 +380,7 @@ Feature: sharing
And user "user0" belongs to group "sharing-group"
And user "user1" belongs to group "sharing-group"
And file "/PARENT/parent.txt" of user "user0" is shared with group "sharing-group"
+ And user "user1" accepts last share
And user "user0" stores etag of element "/PARENT"
And user "user1" stores etag of element "/"
And As an "user1"
@@ -390,6 +417,7 @@ Feature: sharing
| shareType | 0 |
| shareWith | user1 |
| permissions | 31 |
+ And user "user1" accepts last share
And creating a share with
| path | TMP |
| shareType | 0 |
@@ -413,6 +441,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 17 |
When As an "user1"
+ And accepting last share
And creating a share with
| path | TMP |
| shareType | 3 |
@@ -434,6 +463,7 @@ Feature: sharing
| shareWith | user1 |
| permissions | 17 |
When As an "user1"
+ And accepting last share
And creating a share with
| path | TMP/SUB |
| shareType | 3 |
@@ -449,6 +479,7 @@ Feature: sharing
And user "user0" created a folder "/shared"
And User "user0" moved file "/textfile0.txt" to "/shared/shared_file.txt"
And folder "/shared" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When User "user1" deletes file "/shared/shared_file.txt"
Then as "user1" the file "/shared/shared_file.txt" does not exist
And as "user0" the file "/shared/shared_file.txt" does not exist
@@ -463,6 +494,7 @@ Feature: sharing
And user "user0" created a folder "/shared/sub"
And User "user0" moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
And folder "/shared" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
When User "user1" deletes folder "/shared/sub"
Then as "user1" the folder "/shared/sub" does not exist
And as "user0" the folder "/shared/sub" does not exist
@@ -477,6 +509,7 @@ Feature: sharing
And user "user1" 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
When User "user1" moved file "/textfile0.txt" to "/shared/shared_file.txt"
Then as "user1" the file "/shared/shared_file.txt" exists
And as "user0" the file "/shared/shared_file.txt" exists
@@ -490,6 +523,7 @@ Feature: sharing
And As an "user0"
And user "user0" created a folder "/share"
And folder "/share" of user "user0" is shared with group "group1"
+ And user "user1" accepts last share
And user "user0" created a folder "/share/subfolder"
And As an "user1"
And save the last share data as "original"
diff --git a/build/integration/sharing_features/sharing-v1.feature b/build/integration/sharing_features/sharing-v1.feature
index 79753895483..37bbe620caf 100644
--- a/build/integration/sharing_features/sharing-v1.feature
+++ b/build/integration/sharing_features/sharing-v1.feature
@@ -35,6 +35,7 @@ Feature: sharing
And group "sharing-group" exists
And user "user1" belongs to group "sharing-group"
And file "welcome.txt" of user "user0" is shared with group "sharing-group"
+ And user "user1" accepts last share
And As an "user0"
Then creating a share with
| path | welcome.txt |
@@ -311,6 +312,7 @@ Feature: sharing
And user "user2" exists
And user "user3" exists
And file "textfile0.txt" of user "user0" is shared with user "user1"
+ And user "user1" accepts last share
And file "textfile0.txt" of user "user0" is shared with user "user2"
And As an "user1"
When sending "GET" to "/apps/files_sharing/api/v1/shares?path=textfile0 (2).txt&reshares=true"