-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 for deleteShare #31529
API test for deleteShare #31529
Conversation
Then as "user1" the folder "/sub" should not exist | ||
And user "user0" has shared folder "/common/sub" with user "user1" | ||
When user "user0" deletes folder "/common" using the API | ||
Then the OCS status code should be "100" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something went wrong here in the CI
And the etag of element "/PARENT" of user "user0" should not have changed | ||
|
||
Scenario: sharee of a read-only share folder tries to delete the shared folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/share folder/shared folder/
"tries to delete a file in the shared folder"
| shareType | 0 | | ||
| permissions | 1 | | ||
When user "user1" deletes file "/shared/shared_file.txt" using the API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this step, can we check OCS/HTTP status? Should be some fail code?
Same in the following scenarios...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Then as "user1" the file "/shared/shared_file.txt" should exist | ||
|
||
Scenario: sharee of a upload-only share folder tries to delete the shared folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/share folder/shared folder/
"tries to delete a file in the shared folder"
Then as "user0" the file "/shared/shared_file.txt" should exist | ||
|
||
Scenario: sharee of a upload-only share folder tries to delete his share in the folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"sharee of a upload-only shared folder tries to delete a file that he uploaded in the folder"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few little comments...
66b72d2
to
d63a08e
Compare
Codecov Report
@@ Coverage Diff @@
## master #31529 +/- ##
=========================================
Coverage 62.61% 62.61%
Complexity 18273 18273
=========================================
Files 1147 1147
Lines 68627 68627
Branches 1234 1234
=========================================
Hits 42971 42971
Misses 25295 25295
Partials 361 361
Continue to review full report at Codecov.
|
When user "user0" empties the trashbin using the API | ||
And user "user0" has shared folder "/common/sub" with user "user1" | ||
When user "user0" deletes folder "/common" using the API | ||
Then the HTTP status code should be "204" | ||
Then as "user1" the folder "/sub" should not exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Then/And
And as "user0" the file "/shared/shared_file.txt" should exist | ||
|
||
Scenario: sharee of a upload-only share folder tries to delete his share in the folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tries to delete his file in the folder
d63a08e
to
e6328b5
Compare
All comments have been addressed. Ready for merge when CI is finished. |
Backport on #31574 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR adds more API tests for deleting shares.
Related Issue
#31531
How Has This Been Tested?
Locally
Screenshots (if appropriate):
Types of changes
Checklist: