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

ApiTest. Cases for copy/move between project/personal/shares jail #4087

Closed
ScharfViktor opened this issue Jul 4, 2022 · 13 comments
Closed
Assignees
Labels

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Jul 4, 2022

copy-paste:

from from (role) to to (role) Expected result
project spaceAdmin/editor/viewer project spaceAdmin/editor 201
project spaceAdmin/editor project viewer 403
project spaceAdmin/editor/viewer personal   201
project spaceAdmin/editor/viewer share jail editor 201
project spaceAdmin/editor/viewer share jail viewer 403
         
personal   personal   tests is exist in core
personal   project spaceAdmin/editor 201
personal   project viewer 403
personal   share jail editor 201
personal   share jail viewer 403
         
share jail editor personal   201
share jail viewer personal   201
share jail editor/viewer project spaceAdmin/editor 201
share jail editor/viewer project viewer 403
share jail editor/viewer share jail editor 201
share jail editor/viewer share jail viewer 403

move:

from from (role) to to (role) Expected result
project spaceAdmin/editor project spaceAdmin/editor 201
project spaceAdmin/editor project viewer 403
project viewer project spaceAdmin/editor/viewer 403
project spaceAdmin/editor personal   201
project viewer personal   403
project spaceAdmin/editor share jail editor 201
project spaceAdmin/editor share jail viewer 403
project viewer share jail editor/viewer 403
         
personal   personal   tests is exist in core
personal   project spaceAdmin/editor 201
personal   project viewer 403
personal   share jail editor 201
personal   share jail viewer 403
         
share jail editor personal   201
share jail viewer personal   403
share jail editor project spaceAdmin/editor 210
share jail editor project viewer 403
share jail viewer project spaceAdmin/editor/viewer 403
share jail editor share jail editor 201
share jail editor share jail viewer 403
share jail viewer share jail editor 403
@ScharfViktor
Copy link
Contributor Author

I added cases for "copy files" and "move files". We can start to implement it. @individual-it Who wants to do it? Or I can do it myself

@individual-it
Copy link
Member

@SagarGi is working on COPY tests currently anyway, so he could do this also

@individual-it
Copy link
Member

here an interesting case to try #4114

@ScharfViktor
Copy link
Contributor Author

@SagarGi we can only implement moving inside one project space because we prevented moving here: cs3org/reva#3035

@phil-davis
Copy link
Contributor

@SagarGi we can only implement moving inside one project space because we prevented moving here: cs3org/reva#3035

I guess that we can have a scenario that attempts to move between 2 spaces, and expects some HTTP 4xx status, and checks that the original resource remains in its original place. That will prevent accidental regressions of the current behavior.

@ScharfViktor
Copy link
Contributor Author

I guess that we can have a scenario that attempts to move between 2 spaces, and expects some HTTP 4xx status, and checks that the original resource remains in its original place. That will prevent accidental regressions of the current behavior.

Yes, you're right. I misspoke.

@micbar
Copy link
Contributor

micbar commented Jul 7, 2022

The return status will be 502 Bad Gateway according to WebDAV spec. This fix is already in reva.

@butonic already updated in ocis master?

@SagarGi
Copy link
Member

SagarGi commented Jul 11, 2022

TODO QA Team:

@SagarGi
Copy link
Member

SagarGi commented Jul 18, 2022

here an interesting case to try #4114

Tried it and has been fixed. Response is 502 moving between cross-space. No data loss.

@SagarGi
Copy link
Member

SagarGi commented Jul 26, 2022

The tests has been added for COPY and MOVE operation as mentioned in the above tests plan by @ScharfViktor. This operation is only limited to file. we can also try different other combination to test copy api between spaces (since we cannot move files between spaces) or shall we close this issue @phil-davis @ScharfViktor @individual-it ?

@ScharfViktor
Copy link
Contributor Author

The tests has been added for COPY and MOVE operation as mentioned in the above tests plan by @ScharfViktor. This operation is only limited to file. we can also try different other combination to test copy api between spaces (since we cannot move files between spaces) or shall we close this issue @phil-davis @ScharfViktor @individual-it ?

I think to implement same tests to coping or moving folder don't make sence. I'd changed "file" to "folder with file' in some existing positive tests (not all) and check that folder after coping or moving contains file

@SagarGi
Copy link
Member

SagarGi commented Jul 27, 2022

TODO QA Team:

@SagarGi
Copy link
Member

SagarGi commented Aug 10, 2022

API Tests for copy and move has been added with #4087 (comment) and
#4313 as per the above test plan issue. so this issue can be closed.

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

6 participants