-
Notifications
You must be signed in to change notification settings - Fork 186
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] [full-ci] Enhance share copy-overwrite test scenarios #6323
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -262,11 +262,14 @@ Feature: copy file | |||
And user "Brian" has shared folder "BRIAN-Folder" with user "Alice" | ||||
And user "Alice" has accepted share "/BRIAN-Folder" offered by user "Brian" | ||||
When user "Alice" copies file "/textfile1.txt" to "/Shares/BRIAN-Folder" using the WebDAV API | ||||
Then the HTTP status code should be "204" | ||||
And the content of file "/Shares/BRIAN-Folder" for user "Alice" should be "ownCloud test text file 1" | ||||
And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should not exist | ||||
Then the HTTP status code should be "412" | ||||
# the copy request is rejected with 412 "precondition failed" | ||||
# Brian's original folder should still exist and be shared with Alice | ||||
And as "Brian" folder "BRIAN-Folder" should exist | ||||
And as "Brian" folder "BRIAN-Folder/sample-folder" should exist | ||||
And as "Alice" folder "BRIAN-Folder" should exist | ||||
And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist | ||||
And as "Alice" file "/textfile1.txt" should exist | ||||
And user "Alice" should not have any received shares | ||||
Examples: | ||||
| dav_version | | ||||
| old | | ||||
|
@@ -282,9 +285,72 @@ Feature: copy file | |||
And user "Alice" has created folder "FOLDER/sample-folder" | ||||
When user "Alice" copies folder "/FOLDER" to "/Shares/sharedfile1.txt" using the WebDAV API | ||||
Then the HTTP status code should be "204" | ||||
# Alice now sees the content of "her" folder as folder "/Shares/sharedfile1.txt" | ||||
# The share that she received from Brian has "automatically" gone into the "declined" state | ||||
And as "Alice" folder "/FOLDER/sample-folder" should exist | ||||
And as "Alice" folder "/Shares/sharedfile1.txt/sample-folder" should exist | ||||
And user "Alice" should not have any received shares | ||||
And the sharing API should report to user "Alice" that these shares are in the declined state | ||||
| path | | ||||
| /Shares/sharedfile1.txt | | ||||
# Brian still has his original sharedfile1.txt and can see that it is shared with Alice | ||||
And as "Brian" file "sharedfile1.txt" should exist | ||||
And the content of file "sharedfile1.txt" for user "Brian" should be "file to share" | ||||
When user "Brian" gets all shares shared by him using the sharing API | ||||
Then the OCS status code should be "100" | ||||
And the HTTP status code should be "200" | ||||
And file "/Shares/sharedfile1.txt" should be included in the response | ||||
When user "Alice" accepts share "/sharedfile1.txt" offered by user "Brian" using the sharing API | ||||
Then the OCS status code should be "100" | ||||
And the HTTP status code should be "200" | ||||
# now Alice has "her" folder as "/Shares/sharedfile1.txt" | ||||
# and has the shared file from Brian as "/Shares/sharedfile1 (2).txt" | ||||
And as "Alice" folder "/Shares/sharedfile1.txt" should exist | ||||
And as "Alice" folder "/Shares/sharedfile1.txt/sample-folder" should exist | ||||
And as "Alice" file "/Shares/sharedfile1 (2).txt" should exist | ||||
And the content of file "/Shares/sharedfile1 (2).txt" for user "Alice" should be "file to share" | ||||
Examples: | ||||
| dav_version | | ||||
| old | | ||||
| new | | ||||
|
||||
|
||||
Scenario Outline: copy a file over the top of an existing file received as a user share | ||||
Given using <dav_version> DAV path | ||||
And user "Brian" has been created with default attributes and without skeleton files | ||||
And user "Brian" has uploaded file with content "file to share" to "/sharedfile1.txt" | ||||
And user "Brian" has shared file "/sharedfile1.txt" with user "Alice" | ||||
And user "Alice" has accepted share "/sharedfile1.txt" offered by user "Brian" | ||||
When user "Alice" copies file "/textfile1.txt" to "/Shares/sharedfile1.txt" using the WebDAV API | ||||
Then the HTTP status code should be "204" | ||||
And as "Alice" file "/Shares/sharedfile1.txt" should exist | ||||
And the content of file "/Shares/sharedfile1.txt" for user "Alice" should be "ownCloud test text file 1" | ||||
And as "Alice" file "/textfile1.txt" should exist | ||||
And as "Brian" file "/sharedfile1.txt" should exist | ||||
And the content of file "/sharedfile1.txt" for user "Brian" should be "ownCloud test text file 1" | ||||
Examples: | ||||
| dav_version | | ||||
| old | | ||||
| new | | ||||
|
||||
|
||||
Scenario Outline: copy a folder over the top of an existing folder received as a user share | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already have this test:
|
||||
Given using <dav_version> DAV path | ||||
And user "Brian" has been created with default attributes and without skeleton files | ||||
And user "Brian" has created folder "/BRIAN-Folder" | ||||
And user "Brian" has created folder "BRIAN-Folder/sample-folder" | ||||
And user "Brian" has shared folder "BRIAN-Folder" with user "Alice" | ||||
And user "Alice" has accepted share "/BRIAN-Folder" offered by user "Brian" | ||||
And user "Alice" has created folder "FOLDER/ALICE-folder" | ||||
When user "Alice" copies folder "/FOLDER" to "/Shares/BRIAN-Folder" using the WebDAV API | ||||
Then the HTTP status code should be "409" | ||||
And as "Alice" folder "/FOLDER/ALICE-folder" should exist | ||||
And as "Alice" folder "/Shares/BRIAN-Folder" should exist | ||||
And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist | ||||
And as "Alice" folder "/Shares/BRIAN-Folder/ALICE-folder" should not exist | ||||
And as "Brian" folder "BRIAN-Folder" should exist | ||||
And as "Brian" folder "BRIAN-Folder/sample-folder" should exist | ||||
And as "Brian" folder "/Shares/BRIAN-Folder/ALICE-folder" should not exist | ||||
Examples: | ||||
| dav_version | | ||||
| old | | ||||
|
@@ -879,3 +945,19 @@ Feature: copy file | |||
Examples: | ||||
| dav_version | | ||||
| spaces | | ||||
|
||||
|
||||
Scenario Outline: copying a folder with a file onto another folder | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similar test scenario:
|
||||
Given using <dav_version> DAV path | ||||
And user "Alice" has created folder "/FOLDER1" | ||||
And user "Alice" has created folder "/FOLDER2" | ||||
And user "Alice" has uploaded file with content "Folder 1 text" to "/FOLDER1/textfile1.txt" | ||||
And user "Alice" has uploaded file with content "Folder 2 text" to "/FOLDER2/textfile2.txt" | ||||
When user "Alice" copies folder "/FOLDER1" to "/FOLDER2" using the WebDAV API | ||||
Then the HTTP status code should be "204" | ||||
And as "Alice" file "/FOLDER2/textfile1.txt" should exist | ||||
And as "Alice" file "/FOLDER2/textfile2.txt" should not exist | ||||
Examples: | ||||
| dav_version | | ||||
| old | | ||||
| new | |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we already have this test:
ocis/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature
Line 216 in 10bf7f1