Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-22 14:40:59 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-18 11:05:04 +0300
commit388110a35e9e5963326332b56c920f8d12d99c81 (patch)
tree0e6460d49d7a9db3937304429d3116039dbcffdc /build/integration/federation_features/cleanup-remote-storage.feature
parent73d2f42d4100c79437db540ac57313d7536ba0f4 (diff)
Add integration tests for "sharing:cleanup-remote-storages" OCC command
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/federation_features/cleanup-remote-storage.feature')
-rw-r--r--build/integration/federation_features/cleanup-remote-storage.feature53
1 files changed, 53 insertions, 0 deletions
diff --git a/build/integration/federation_features/cleanup-remote-storage.feature b/build/integration/federation_features/cleanup-remote-storage.feature
new file mode 100644
index 00000000000..c782987cac0
--- /dev/null
+++ b/build/integration/federation_features/cleanup-remote-storage.feature
@@ -0,0 +1,53 @@
+Feature: cleanup-remote-storage
+ Background:
+ Given using api version "1"
+
+ Scenario: cleanup remote storage with active storages
+ Given Using server "LOCAL"
+ And user "user0" exists
+ Given Using server "REMOTE"
+ And user "user1" exists
+ # Rename file so it has a unique name in the target server (as the target
+ # server may have its own /textfile0.txt" file)
+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
+ And Using server "LOCAL"
+ # Accept and download the file to ensure that a storage is created for the
+ # federated share
+ And User "user0" from server "LOCAL" accepts last pending share
+ And As an "user0"
+ And Downloading file "/remote-share.txt"
+ And the HTTP status code should be "200"
+ When invoking occ with "sharing:cleanup-remote-storage"
+ Then the command was successful
+ And the command output contains the text "1 remote storage(s) need(s) to be checked"
+ And the command output contains the text "1 remote share(s) exist"
+ And the command output contains the text "no storages deleted"
+
+ Scenario: cleanup remote storage with inactive storages
+ Given Using server "LOCAL"
+ And user "user0" exists
+ Given Using server "REMOTE"
+ And user "user1" exists
+ # Rename file so it has a unique name in the target server (as the target
+ # server may have its own /textfile0.txt" file)
+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
+ And Using server "LOCAL"
+ # Accept and download the file to ensure that a storage is created for the
+ # federated share
+ And User "user0" from server "LOCAL" accepts last pending share
+ And As an "user0"
+ And Downloading file "/remote-share.txt"
+ And the HTTP status code should be "200"
+ And Using server "REMOTE"
+ And As an "user1"
+ And Deleting last share
+ And the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ When Using server "LOCAL"
+ And invoking occ with "sharing:cleanup-remote-storage"
+ Then the command was successful
+ And the command output contains the text "1 remote storage(s) need(s) to be checked"
+ And the command output contains the text "0 remote share(s) exist"
+ And the command output contains the text "deleted 1 storage"