diff options
author | Sergio BertolĂn <sbertolin@solidgear.es> | 2016-02-19 14:13:19 +0000 |
---|---|---|
committer | Sergio Bertolin <sbertolin@solidgear.es> | 2016-03-11 08:49:26 +0000 |
commit | 44da5fe1ab2d74d6eb09b11e40e763b3b5c88c58 (patch) | |
tree | 09e4786bb3d6369edf0885dc8e741b623502220b /build/integration/federation_features/federated.feature | |
parent | 1ed831564e47a35ce41f78cc6a67a95a06ad5f50 (diff) | |
download | nextcloud-server-44da5fe1ab2d74d6eb09b11e40e763b3b5c88c58.tar.gz nextcloud-server-44da5fe1ab2d74d6eb09b11e40e763b3b5c88c58.zip |
Adding new tests for federation sharing
Diffstat (limited to 'build/integration/federation_features/federated.feature')
-rw-r--r-- | build/integration/federation_features/federated.feature | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/build/integration/federation_features/federated.feature b/build/integration/federation_features/federated.feature index 5437d01dee2..8cb47a48f0b 100644 --- a/build/integration/federation_features/federated.feature +++ b/build/integration/federation_features/federated.feature @@ -10,6 +10,110 @@ Feature: federated When User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" Then the OCS status code should be "100" And the HTTP status code should be "200" + And Share fields of last share match with + | id | A_NUMBER | + | item_type | file | + | item_source | A_NUMBER | + | share_type | 6 | + | file_source | A_NUMBER | + | path | /textfile0.txt | + | permissions | 19 | + | stime | A_NUMBER | + | storage | A_NUMBER | + | mail_send | 0 | + | uid_owner | user0 | + | storage_id | home::user0 | + | file_parent | A_NUMBER | + | displayname_owner | user0 | + | share_with | user1@REMOTE | + | share_with_displayname | user1@REMOTE | + + Scenario: Federate share a file with local server + Given Using server "LOCAL" + And user "user0" exists + And Using server "REMOTE" + And user "user1" exists + When User "user1" from server "REMOTE" shares "/textfile0.txt" with user "user0" from server "LOCAL" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And Share fields of last share match with + | id | A_NUMBER | + | item_type | file | + | item_source | A_NUMBER | + | share_type | 6 | + | file_source | A_NUMBER | + | path | /textfile0.txt | + | permissions | 19 | + | stime | A_NUMBER | + | storage | A_NUMBER | + | mail_send | 0 | + | uid_owner | user1 | + | storage_id | home::user1 | + | file_parent | A_NUMBER | + | displayname_owner | user1 | + | share_with | user0@LOCAL | + | share_with_displayname | user0@LOCAL | + + Scenario: Remote sharee can see the pending share + Given Using server "REMOTE" + And user "user1" exists + And Using server "LOCAL" + And user "user0" exists + And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" + And Using server "REMOTE" + And As an "user1" + When sending "GET" to "/apps/files_sharing/api/v1/remote_shares/pending" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And Share fields of last share match with + | id | A_NUMBER | + | remote | LOCAL | + | remote_id | A_NUMBER | + | share_token | A_TOKEN | + | name | /textfile0.txt | + | owner | user0 | + | user | user1 | + | mountpoint | {{TemporaryMountPointName#/textfile0.txt}} | + | accepted | 0 | + + Scenario: accept a pending remote share + Given Using server "REMOTE" + And user "user1" exists + And Using server "LOCAL" + And user "user0" exists + And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" + When User "user1" from server "REMOTE" accepts last pending share + Then the OCS status code should be "100" + And the HTTP status code should be "200" + + Scenario: Federate reshare a file + Given Using server "REMOTE" + And user "user1" exists + And Using server "LOCAL" + And user "user0" exists + And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" + And User "user1" from server "REMOTE" accepts last pending share + And Using server "REMOTE" + And As an "user1" + When User "user1" from server "REMOTE" shares "/textfile0 (2).txt" with user "user0" from server "LOCAL" + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And Share fields of last share match with + | id | A_NUMBER | + | item_type | file | + | item_source | A_NUMBER | + | share_type | 6 | + | file_source | A_NUMBER | + | path | /textfile0 (2).txt | + | permissions | 19 | + | stime | A_NUMBER | + | storage | A_NUMBER | + | mail_send | 0 | + | uid_owner | user1 | + | file_parent | A_NUMBER | + | displayname_owner | user1 | + | share_with | user0@LOCAL | + | share_with_displayname | user0@LOCAL | |