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

[Tests-Only] update reva api tests related to sharing #37396

Merged
merged 1 commit into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Feature: auth
| /ocs/v1.php/cloud/users | 403 | 200 |
| /ocs/v2.php/cloud/users | 403 | 403 |
| /ocs/v1.php/config | 100 | 200 |
| /ocs/v2.php/config | 100 | 200 |
| /ocs/v2.php/config | 200 | 200 |
| /ocs/v1.php/privatedata/getattribute | 998 | 200 |
| /ocs/v2.php/privatedata/getattribute | 998 | 404 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Feature: cannot share resources with invalid permissions
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 100 | 200 |
| 2 | 200 | 200 |

@skipOnOcis @issue-ocis-reva-45 @issue-ocis-reva-64
Scenario Outline: Cannot create a share of a file with a user with only (create,delete) permission
Expand Down Expand Up @@ -98,9 +98,9 @@ Feature: cannot share resources with invalid permissions
Examples:
| ocs_api_version | ocs_status_code | http_status_code | permissions |
| 1 | 100 | 200 | delete |
| 2 | 100 | 200 | delete |
| 2 | 200 | 200 | delete |
| 1 | 100 | 200 | create,delete |
| 2 | 100 | 200 | create,delete |
| 2 | 200 | 200 | create,delete |

@skipOnOcis @issue-ocis-reva-34
Scenario Outline: Cannot create a share of a file with a group with only create permission
Expand Down
106 changes: 0 additions & 106 deletions tests/acceptance/features/apiShareManagementBasic/createShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |

@skipOnOcis
@issue-ocis-reva-20
@issue-ocis-reva-26
@issue-ocis-reva-43
@issue-ocis-reva-44
@issue-ocis-reva-64
Scenario Outline: Creating a share of a file with a user and asking for various permission combinations
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -71,35 +65,6 @@ Feature: sharing
| 1 | 2 | 2 | 100 |
| 2 | 2 | 2 | 200 |

@skipOnOcV10
@issue-ocis-reva-20
@issue-ocis-reva-26
@issue-ocis-reva-43
@issue-ocis-reva-44
@issue-ocis-reva-64
#after fixing all issues delete this Scenario and use the one above
Scenario Outline: Creating a share of a file with a user and asking for various permission combinations
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" shares file "textfile0.txt" with user "Brian" with permissions <requested_permissions> using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the OCS status message should be "OK"
Examples:
| ocs_api_version | requested_permissions | granted_permissions | ocs_status_code |
# Ask for full permissions. You get share plus read plus update. create and delete do not apply to shares of a file
| 1 | 31 | 31 | 100 |
| 2 | 31 | 31 | 100 |
# Ask for read, share (17), create and delete. You get share plus read
| 1 | 29 | 31 | 100 |
| 2 | 29 | 31 | 100 |
# Ask for read, update, create, delete. You get read plus update.
| 1 | 15 | 15 | 100 |
| 2 | 15 | 15 | 100 |
# Ask for just update. You get exactly update (you do not get read or anything else)
| 1 | 2 | 2 | 100 |
| 2 | 2 | 2 | 100 |

Scenario Outline: Creating a share of a file with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -113,51 +78,6 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |

@skipOnOcV10
@issue-ocis-reva-64
#after fixing all issues delete this Scenario or adjust it, so that it works also with oC10
Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "Random data" to "randomfile.txt"
When user "Alice" shares file "/randomfile.txt" with user "Brian" using the sharing API
Then the OCS status code should be "100"
And the OCS status message should be "OK"
And the HTTP status code should be "<http_status_code>"
And as "Brian" file "randomfile.txt" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 200 |

@skipOnOcV10
@issue-ocis-reva-64
#after fixing all issues delete this Scenario or adjust it, so that it works also with oC10
Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" shares file "/doesNotExist/randomfile.txt" with user "Brian" using the sharing API
And the HTTP status code should be "<http_status_code>"
And as "Brian" file "randomfile.txt" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |

@skipOnOcV10
@issue-ocis-reva-64
#after fixing all issues delete this Scenario or adjust it, so that it works also with oC10
Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" shares file "/NotExistingFile.txt" with user "Brian" using the sharing API
And the HTTP status code should be "<http_status_code>"
And as "Brian" file "randomfile.txt" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |

@skipOnOcis
@issue-ocis-reva-64
#OCIS returns an empty response when sharing with a file inside the /home folder
Expand Down Expand Up @@ -189,12 +109,6 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |

@skipOnOcis
@issue-ocis-reva-20
@issue-ocis-reva-26
@issue-ocis-reva-43
@issue-ocis-reva-46
@issue-ocis-reva-64
Scenario Outline: Creating a share of a folder with a user, the default permissions are all permissions(31)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -219,26 +133,6 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |

@skipOnOcV10
@issue-ocis-reva-20
@issue-ocis-reva-26
@issue-ocis-reva-43
@issue-ocis-reva-46
@issue-ocis-reva-64
#after fixing all issues delete this Scenario and use the one above
Scenario Outline: Creating a share of a folder with a user, the default permissions are all permissions(31)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/FOLDER"
When user "Alice" shares folder "/FOLDER" with user "Brian" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the OCS status message should be "OK"
And the HTTP status code should be "200"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 100 |

@skipOnOcis @issue-ocis-reva-34
Scenario Outline: Creating a share of a file with a group, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiVersions/fileVersions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Feature: dav-versions
And user "Alice" uploads file "filesForUpload/davtest.txt" asynchronously to "/davtest.txt" in 3 chunks with new chunking and using the WebDAV API
Then the version folder of file "/davtest.txt" for user "Alice" should contain "1" element

@smokeTest @issue-ocis-reva-94
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to leave that tag, just for reference

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we leave the issue tag?

@smokeTest
Scenario: Remove a file
Given user "Alice" has uploaded file "filesForUpload/davtest.txt" to "/davtest.txt"
And user "Alice" has uploaded file "filesForUpload/davtest.txt" to "/davtest.txt"
Expand Down