[full-ci] ApiTests. enable auto accepting in api tests (#7477)

* enable auto accepting in test

* go format
This commit is contained in:
Viktor Scharf
2023-10-17 16:29:05 +02:00
committed by GitHub
parent 917ee878cb
commit c179485db6
95 changed files with 458 additions and 1063 deletions
@@ -34,7 +34,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "/tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -56,7 +55,6 @@ Feature: sharing
| shareType | group |
| permissions | share,update,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -72,7 +70,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | update,read |
Then the HTTP status code should be "200"
@@ -93,7 +90,6 @@ Feature: sharing
| shareType | group |
| permissions | update,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -109,7 +105,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,read |
Then the HTTP status code should be "200"
@@ -130,7 +125,6 @@ Feature: sharing
| shareType | group |
| permissions | share,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -165,7 +159,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -186,7 +179,6 @@ Feature: sharing
| path | tmp |
| shareType | group |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -202,7 +194,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,delete,create,read |
Then the HTTP status code should be "200"
@@ -223,7 +214,6 @@ Feature: sharing
| shareType | group |
| shareWith | grp1 |
| permissions | share,delete,create,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -239,7 +229,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,delete,update,read |
Then the HTTP status code should be "200"
@@ -260,7 +249,6 @@ Feature: sharing
| shareType | group |
| shareWith | grp1 |
| permissions | share,delete,update,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -276,7 +264,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,create,update,read |
Then the HTTP status code should be "200"
@@ -297,7 +284,6 @@ Feature: sharing
| shareType | group |
| shareWith | grp1 |
| permissions | share,create,update,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -313,7 +299,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | change |
Then the HTTP status code should be "200"
@@ -334,7 +319,6 @@ Feature: sharing
| shareType | group |
| shareWith | grp1 |
| permissions | change |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -14,7 +14,6 @@ Feature: share access by ID
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
When user "Alice" shares file "textfile0.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API
And user "Alice" gets share with id "%last_share_id%" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -59,7 +58,6 @@ Feature: share access by ID
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
When user "Alice" shares file "textfile0.txt" with user "Brian" using the sharing API
And user "Brian" accepts share with ID "%last_share_id%" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And user "Brian" should see the following elements
@@ -75,7 +73,6 @@ Feature: share access by ID
Scenario Outline: accept a share using the invalid share Id
Given using OCS API version "<ocs_api_version>"
When user "Brian" accepts share with ID "<share_id>" using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
And the API should not return any data
@@ -93,7 +90,6 @@ Feature: share access by ID
Scenario Outline: accept a share using empty share Id
Given using OCS API version "<ocs_api_version>"
When user "Brian" accepts share with ID "" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And the API should not return any data
@@ -107,7 +103,6 @@ Feature: share access by ID
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" declines share with ID "%last_share_id%" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -15,7 +15,6 @@ Feature: sharing
| shareType | user |
| permissions | read |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -32,7 +31,6 @@ Feature: sharing
| shareType | group |
| permissions | read |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -51,7 +49,6 @@ Feature: sharing
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -79,7 +76,6 @@ Feature: sharing
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -105,7 +101,6 @@ Feature: sharing
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -131,7 +126,6 @@ Feature: sharing
| shareType | group |
| permissions | change |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -152,7 +146,6 @@ Feature: sharing
And the quota of user "Brian" has been set to "0"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/myfile.txt"
And user "Alice" has shared file "myfile.txt" with user "Brian"
And user "Brian" has accepted share "/myfile.txt" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/myfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the following headers should match these regular expressions for user "Brian"
@@ -178,7 +171,6 @@ Feature: sharing
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And the quota of user "Alice" has been set to "0"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -200,7 +192,6 @@ Feature: sharing
| shareType | group |
| permissions | change |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And the quota of user "Alice" has been set to "0"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -220,7 +211,6 @@ Feature: sharing
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And the quota of user "Alice" has been set to "0"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -242,7 +232,6 @@ Feature: sharing
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And the quota of user "Alice" has been set to "0"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -262,7 +251,6 @@ Feature: sharing
| shareType | user |
| permissions | <permissions> |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads file with content "some content" to "/Shares/FOLDER/textFile.txt" using the WebDAV API
And user "Alice" downloads file "/FOLDER/textFile.txt" using the WebDAV API
Then the HTTP status code should be "200"
@@ -278,7 +266,6 @@ Feature: sharing
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/folder-to-share"
And user "Brian" has shared folder "/folder-to-share" with user "Alice"
And user "Alice" has accepted share "/folder-to-share" offered by user "Brian"
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "/Shares/folder-to-share/zerobyte.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/Shares/folder-to-share/zerobyte.txt" should exist