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

API test cases for COPY file between spaces #9878

Closed
S-Panta opened this issue Aug 21, 2024 · 7 comments
Closed

API test cases for COPY file between spaces #9878

S-Panta opened this issue Aug 21, 2024 · 7 comments
Assignees
Labels

Comments

@S-Panta
Copy link
Contributor

S-Panta commented Aug 21, 2024

COPY

Similar to #8121

1. Using file id

Test cases

from from (role) to to (role) expected result automated
personal personal{within same folder} 201 201 πŸ‘ βœ…
personal personal{inside subfolder} 201 201 πŸ‘ βœ…
personal personal{from subfolder to root } 201 201 πŸ‘ βœ…
personal project{finside folder} 201 201 πŸ‘ βœ…
project personal 201 201 πŸ‘ βœ…
share jail share jail {from sub-folder to another folder inside share} Editor 201 201 πŸ‘ βœ…
personal share jail Editor 201 201 πŸ‘ βœ…
share jail personal 201 201 πŸ‘ βœ…
project project{project spaces within same user} 201 201 πŸ‘ βœ…
project different permission share jail different permission 201 201 πŸ‘ βœ… #9940
project different permission personal 201 201 πŸ‘ βœ… #9940
project different permission project different permission 201 201 πŸ‘ βœ… #9940
share jail different permission project different permission 201 201 πŸ‘ βœ… #9932
share jail different permission share jail different permission 201 201 πŸ‘ βœ… #9932
share jail different permission personal 201 201 πŸ‘ βœ… #9932

2. Using file path

Test cases

from from (role) to to (role) expected result automated
project project{both file and folder within folder of shared project space} Manager and Space Editor 201 201 πŸ‘ βœ…
project project{within folder of shared project space} Viewer 403 403 πŸ‘ βœ…
project Manager/Space Editor project Manager/ Space Editor 201 201 πŸ‘ βœ…
project Manager/ Space Editor project viewer 403 403 πŸ‘ βœ…
project Manager/ Space Editor/ Space Viewer personal 201 201 πŸ‘ βœ…
project Manager/ Space Editor/ Space Viewer share jail(inside folder) editor 201 201 πŸ‘ βœ…
project Manager/ Space Editor/ Space Viewer share jail(inside folder) viewer 403 403 πŸ‘ βœ…
project manager/space editor/viewer project Manager and Space Editor 201 201 πŸ‘ βœ…
project manager/space editor/viewer project Space Viewer 403 403 πŸ‘ βœ…
project manager/space editor/viewer share jail Editor 201 201 πŸ‘ βœ…
project manager/space editor/viewer share jail viewer 403 403 πŸ‘ βœ…
personal share jail viewer 403 403 πŸ‘ βœ…
personal share jail Editor(option keep both) 201 201 πŸ‘ βœ…
personal share jail Editor(option replace) 204 204 βœ…
personal project Manager/Space editor 201 201 πŸ‘ βœ…
personal project viewer 403 403 πŸ‘ βœ…
personal share jail Editor 201 201 πŸ‘ βœ…
personal share jail(overwrites a file) viewer 403 403 πŸ‘ βœ…
personal share jail (copy file over existing folder) Editor 400 400 #7208 βœ…
personal share jail (copy folder over existing file) Editor 400 400 βœ… #6323
personal share jail (copy a folder into another folder at different level) Editor 204 204 πŸ‘ βœ…
personal share jail (copy a file into another folder at different level) Editor 204 204 πŸ‘ βœ…
personal share jail (copy a file into another file at different level) Editor 204 204 πŸ‘ βœ…
personal share jail (copy a folder into another file at different level) (all overwrites scenario are done also for group share) Editor 204 204 πŸ‘ βœ…
share jail editor/viewer personal 201 201 πŸ‘ βœ…
share jail secure viewer personal 403 403 πŸ‘(#9482) βœ…
share jail editor/ viewer project manager/space editor 201 201 πŸ‘ βœ…
share jail secure viewer project manager/space editor 403 403 πŸ‘:(#9482) βœ…
share jail editor project viewer 403 403 πŸ‘ βœ…
share jail editor/viewer share jail ( between different shares) editor 201 201 πŸ‘ βœ…
share jail editor/viewer/secure viewer share jail ( between different shares) viewer/secure viewer 403 403 πŸ‘:(#9482) βœ…

Other scenario related to copy

  • copying a file with an option "keep both" inside of the project space
  • copying a file with an option "replace" inside of the project space
  • copy blacklisted file isn't possible.
  • copy a file of size zero byte
  • copy (existent/non existent file/folder) into (existent/non existent file/folder)
  • copying a folder into a sub-folder of itself

Bug Report

@S-Panta
Copy link
Contributor Author

S-Panta commented Aug 21, 2024

@saw-jan @SagarGi Do we need any extra test cases for copying via file id? I think there are enough cases for copying via path.

@Salipa-Gurung Salipa-Gurung self-assigned this Aug 22, 2024
@saw-jan
Copy link
Member

saw-jan commented Aug 22, 2024

@Salipa-Gurung
Copy link
Contributor

The expected status code for the test cases below and the status code in the automated tests does not match ❗

from from (role) to to (role) expected result automated
personal share jail Editor(option replace) 201 204 ❔ βœ…
personal share jail (copy file over existing folder) Editor 204 400 ❔ #7208 βœ…
personal share jail (copy folder over existing file) Editor 204 400 ❔ βœ… #6323

@saw-jan
Copy link
Member

saw-jan commented Oct 15, 2024

This should be the correct expectation and result

from from (role) to to (role) expected result automated
personal share jail Editor(option replace) 204 204 βœ…
personal share jail (copy file over existing folder) Editor 400 400 βœ…
personal share jail (copy folder over existing file) Editor 400 400 βœ…

@saw-jan
Copy link
Member

saw-jan commented Oct 15, 2024

Please, close this issue if you think everything is covered

@Salipa-Gurung
Copy link
Contributor

Salipa-Gurung commented Oct 15, 2024

Once test coverage for the test cases listed below has been confirmed then we can close this issue.

Other scenario related to copy

Bug Report

@anon-pradip
Copy link
Contributor

Since all the test cases have been covered, we can close this. cc @Salipa-Gurung @saw-jan @S-Panta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants