1
0

cleanup-remote-storage.feature 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Feature: cleanup-remote-storage
  2. Background:
  3. Given using api version "1"
  4. Scenario: cleanup remote storage with active storages
  5. Given Using server "LOCAL"
  6. And user "user0" exists
  7. Given Using server "REMOTE"
  8. And user "user1" exists
  9. # Rename file so it has a unique name in the target server (as the target
  10. # server may have its own /textfile0.txt" file)
  11. And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
  12. And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
  13. And Using server "LOCAL"
  14. # Accept and download the file to ensure that a storage is created for the
  15. # federated share
  16. And User "user0" from server "LOCAL" accepts last pending share
  17. And As an "user0"
  18. And Downloading file "/remote-share.txt"
  19. And the HTTP status code should be "200"
  20. When invoking occ with "sharing:cleanup-remote-storage"
  21. Then the command was successful
  22. And the command output contains the text "1 remote storage(s) need(s) to be checked"
  23. And the command output contains the text "1 remote share(s) exist"
  24. And the command output contains the text "no storages deleted"
  25. Scenario: cleanup remote storage with inactive storages
  26. Given Using server "LOCAL"
  27. And user "user0" exists
  28. Given Using server "REMOTE"
  29. And user "user1" exists
  30. # Rename file so it has a unique name in the target server (as the target
  31. # server may have its own /textfile0.txt" file)
  32. And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
  33. And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
  34. And Using server "LOCAL"
  35. # Accept and download the file to ensure that a storage is created for the
  36. # federated share
  37. And User "user0" from server "LOCAL" accepts last pending share
  38. And As an "user0"
  39. And Downloading file "/remote-share.txt"
  40. And the HTTP status code should be "200"
  41. And Using server "REMOTE"
  42. And As an "user1"
  43. And Deleting last share
  44. And the OCS status code should be "100"
  45. And the HTTP status code should be "200"
  46. When Using server "LOCAL"
  47. And invoking occ with "sharing:cleanup-remote-storage"
  48. Then the command was successful
  49. And the command output contains the text "1 remote storage(s) need(s) to be checked"
  50. And the command output contains the text "0 remote share(s) exist"
  51. And the command output contains the text "deleted 1 storage"