1
0

external-storage.feature 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Feature: external-storage
  2. Background:
  3. Given using api version "1"
  4. Given using old dav path
  5. @local_storage
  6. Scenario: Share by link a file inside a local external storage
  7. Given user "user0" exists
  8. And user "user1" exists
  9. And As an "user0"
  10. And user "user0" created a folder "/local_storage/foo"
  11. And User "user0" moved file "/textfile0.txt" to "/local_storage/foo/textfile0.txt"
  12. And folder "/local_storage/foo" of user "user0" is shared with user "user1"
  13. And As an "user1"
  14. And accepting last share
  15. When creating a share with
  16. | path | foo |
  17. | shareType | 3 |
  18. Then the OCS status code should be "100"
  19. And the HTTP status code should be "200"
  20. And Share fields of last share match with
  21. | id | A_NUMBER |
  22. | url | AN_URL |
  23. | token | A_TOKEN |
  24. | mimetype | httpd/unix-directory |
  25. Scenario: Shares don't overwrite external storages
  26. Given user "user0" exists
  27. And user "user1" exists
  28. And As an "user0"
  29. And User "user0" moved file "/textfile0.txt" to "/local_storage/textfile0.txt"
  30. And invoking occ with "files_external:create --user user0 test local null::null -c datadir=./build/integration/work/local_storage"
  31. And invoking occ with "files:scan --path /user0/files/test"
  32. And as "user0" the file "/local_storage/textfile0.txt" exists
  33. And as "user0" the folder "/test" exists
  34. And as "user0" the file "/test/textfile0.txt" exists
  35. And As an "user1"
  36. And user "user1" created a folder "/test"
  37. And User "user1" moved file "/textfile0.txt" to "/test/textfile1.txt"
  38. And folder "/test" of user "user1" is shared with user "user0"
  39. And As an "user0"
  40. Then as "user0" the file "/test/textfile1.txt" does not exist
  41. Scenario: Move a file into storage works
  42. Given user "user0" exists
  43. And user "user1" exists
  44. And As an "user0"
  45. And user "user0" created a folder "/local_storage/foo1"
  46. When User "user0" moved file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt"
  47. Then as "user1" the file "/local_storage/foo1/textfile0.txt" exists
  48. And as "user0" the file "/local_storage/foo1/textfile0.txt" exists
  49. Scenario: Move a file out of the storage works
  50. Given user "user0" exists
  51. And user "user1" exists
  52. And As an "user0"
  53. And user "user0" created a folder "/local_storage/foo2"
  54. And User "user0" moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt"
  55. When User "user1" moved file "/local_storage/foo2/textfile0.txt" to "/local.txt"
  56. Then as "user1" the file "/local_storage/foo2/textfile0.txt" does not exist
  57. And as "user0" the file "/local_storage/foo2/textfile0.txt" does not exist
  58. And as "user1" the file "/local.txt" exists