Skip to content
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
25 changes: 16 additions & 9 deletions tests/acceptance/features/apiFederation/etagPropagation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Feature: propagation of etags between federated and local server
And user "user0" has stored etag of element "/"
And using server "LOCAL"
When user "user1" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
# After fixing issue-enterprise-2848, change the following step to "should have changed"
Then the etag of element "/" of user "user0" on server "REMOTE" should not have changed
#Then the etag of element "/" of user "user0" on server "REMOTE" should have changed
And the etag of element "/" of user "user0" on server "REMOTE" should not have changed
#And the etag of element "/" of user "user0" on server "REMOTE" should have changed

@issue-enterprise-2848
Scenario: Adding a file to a federated shared folder as sharer propagates etag to root folder for recipient
Expand All @@ -37,46 +38,52 @@ Feature: propagation of etags between federated and local server
And user "user0" has stored etag of element "/"
And using server "LOCAL"
When user "user1" uploads file "filesForUpload/lorem.txt" to "/PARENT/new-textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
# After fixing issue-enterprise-2848, change the following step to "should have changed"
Then the etag of element "/" of user "user0" on server "REMOTE" should not have changed
#Then the etag of element "/" of user "user0" on server "REMOTE" should have changed
And the etag of element "/" of user "user0" on server "REMOTE" should not have changed
#And the etag of element "/" of user "user0" on server "REMOTE" should have changed

Scenario: Overwrite a federated shared folder as recipient propagates etag for recipient
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
And user "user0" has stored etag of element "/PARENT (2)"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the etag of element "/PARENT (2)" of user "user0" on server "REMOTE" should have changed
Then the HTTP status code should be "201"
And the etag of element "/PARENT (2)" of user "user0" on server "REMOTE" should have changed

Scenario: Overwrite a federated shared folder as recipient propagates etag to root folder for recipient
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
And user "user0" has stored etag of element "/"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the etag of element "/" of user "user0" on server "REMOTE" should have changed
Then the HTTP status code should be "201"
And the etag of element "/" of user "user0" on server "REMOTE" should have changed

Scenario: Overwrite a federated shared folder as recipient propagates etag for sharer
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user1" has stored etag of element "/PARENT"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the etag of element "/PARENT" of user "user1" on server "LOCAL" should have changed
Then the HTTP status code should be "201"
And the etag of element "/PARENT" of user "user1" on server "LOCAL" should have changed

Scenario: Overwrite a federated shared folder as recipient propagates etag to root folder for sharer
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user1" has stored etag of element "/"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the etag of element "/" of user "user1" on server "LOCAL" should have changed
Then the HTTP status code should be "201"
And the etag of element "/" of user "user1" on server "LOCAL" should have changed

Scenario: Adding a file to a federated shared folder as recipient propagates etag to root folder for sharer
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user1" has stored etag of element "/"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
When user "user0" uploads file "filesForUpload/lorem.txt" to "/PARENT (2)/new-textfile.txt" using the WebDAV API
Then the etag of element "/" of user "user1" on server "LOCAL" should have changed
Then the HTTP status code should be "201"
And the etag of element "/" of user "user1" on server "LOCAL" should have changed
22 changes: 14 additions & 8 deletions tests/acceptance/features/apiFederation/federated.feature
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,30 @@ Feature: federated
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/textfile0 (2).txt" using the WebDAV API
Then the content of file "/textfile0.txt" for user "user1" on server "LOCAL" should be "BLABLABLA" plus end-of-line
Then the HTTP status code should be "204"
And the content of file "/textfile0.txt" for user "user1" on server "LOCAL" should be "BLABLABLA" plus end-of-line

Scenario: Overwrite a federated shared file as recipient - remote server shares - local server receives
Given user "user0" from server "REMOTE" has shared "/textfile0.txt" with user "user1" from server "LOCAL"
And user "user1" from server "LOCAL" has accepted the last pending share
When user "user1" uploads file "filesForUpload/file_to_overwrite.txt" to "/textfile0 (2).txt" using the WebDAV API
Then the content of file "/textfile0.txt" for user "user0" on server "REMOTE" should be "BLABLABLA" plus end-of-line
Then the HTTP status code should be "204"
And the content of file "/textfile0.txt" for user "user0" on server "REMOTE" should be "BLABLABLA" plus end-of-line

Scenario: Overwrite a file in a federated shared folder as recipient - local server shares - remote server receives
Given user "user1" from server "LOCAL" has shared "/PARENT" with user "user0" from server "REMOTE"
And user "user0" from server "REMOTE" has accepted the last pending share
And using server "REMOTE"
When user "user0" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the content of file "/PARENT/textfile0.txt" for user "user1" on server "LOCAL" should be "BLABLABLA" plus end-of-line
Then the HTTP status code should be "201"
And the content of file "/PARENT/textfile0.txt" for user "user1" on server "LOCAL" should be "BLABLABLA" plus end-of-line

Scenario: Overwrite a file in a federated shared folder as recipient - remote server shares - local server receives
Given user "user0" from server "REMOTE" has shared "/PARENT" with user "user1" from server "LOCAL"
And user "user1" from server "LOCAL" has accepted the last pending share
When user "user1" uploads file "filesForUpload/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt" using the WebDAV API
Then the content of file "/PARENT/textfile0.txt" for user "user0" on server "REMOTE" should be "BLABLABLA" plus end-of-line
Then the HTTP status code should be "201"
And the content of file "/PARENT/textfile0.txt" for user "user0" on server "REMOTE" should be "BLABLABLA" plus end-of-line

Scenario: Overwrite a federated shared file as recipient using old chunking
Given user "user0" from server "REMOTE" has shared "/textfile0.txt" with user "user1" from server "LOCAL"
Expand All @@ -134,8 +138,9 @@ Feature: federated
| 1 | AAAAA |
| 2 | BBBBB |
| 3 | CCCCC |
Then the content of file "/textfile0 (2).txt" for user "user1" should be "AAAAABBBBBCCCCC"
Then the content of file "/textfile0.txt" for user "user0" on server "REMOTE" should be "AAAAABBBBBCCCCC"
Then the HTTP status code should be "201"
And the content of file "/textfile0 (2).txt" for user "user1" should be "AAAAABBBBBCCCCC"
And the content of file "/textfile0.txt" for user "user0" on server "REMOTE" should be "AAAAABBBBBCCCCC"

Scenario: Overwrite a file in a federated shared folder as recipient using old chunking
Given user "user0" from server "REMOTE" has shared "/PARENT" with user "user1" from server "LOCAL"
Expand All @@ -144,7 +149,8 @@ Feature: federated
| 1 | AAAAA |
| 2 | BBBBB |
| 3 | CCCCC |
Then the content of file "/PARENT (2)/textfile0.txt" for user "user1" should be "AAAAABBBBBCCCCC"
Then the HTTP status code should be "201"
And the content of file "/PARENT (2)/textfile0.txt" for user "user1" should be "AAAAABBBBBCCCCC"
And the content of file "/PARENT/textfile0.txt" for user "user0" on server "REMOTE" should be "AAAAABBBBBCCCCC"

Scenario: Trusted server handshake does not require authenticated requests - we force 403 by sending an empty body
Expand All @@ -160,7 +166,7 @@ Feature: federated
And using server "LOCAL"
When user "user1" uploads file "filesForUpload/textfile.txt" to filenames based on "/PARENT (2)/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "201"
Then as user "user0" on server "REMOTE" the files uploaded to "/PARENT/testquota.txt" with all mechanisms should exist
And as user "user0" on server "REMOTE" the files uploaded to "/PARENT/testquota.txt" with all mechanisms should exist

@skipOnLDAP
Scenario: Upload file to received federated share while quota is set on remote storage - local server shares - remote server receives
Expand Down