external-storage.feature 2.6 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. When creating a share with
  15. | path | foo |
  16. | shareType | 3 |
  17. Then the OCS status code should be "100"
  18. And the HTTP status code should be "200"
  19. And Share fields of last share match with
  20. | id | A_NUMBER |
  21. | url | AN_URL |
  22. | token | A_TOKEN |
  23. | mimetype | httpd/unix-directory |
  24. Scenario: Shares dont overwrite external storages
  25. Given user "user0" exists
  26. And user "user1" exists
  27. And As an "user0"
  28. And User "user0" moved file "/textfile0.txt" to "/local_storage/textfile0.txt"
  29. And invoking occ with "files_external:create --user user0 test local null::null -c datadir=./build/integration/work/local_storage"
  30. And invoking occ with "files:scan --path /user0/files/test"
  31. And as "user0" the file "/local_storage/textfile0.txt" exists
  32. And as "user0" the folder "/test" exists
  33. And as "user0" the file "/test/textfile0.txt" exists
  34. And As an "user1"
  35. And user "user1" created a folder "/test"
  36. And User "user1" moved file "/textfile0.txt" to "/test/textfile1.txt"
  37. And folder "/test" of user "user1" is shared with user "user0"
  38. And As an "user0"
  39. Then as "user0" the file "/test/textfile1.txt" does not exist
  40. Scenario: Move a file into storage works
  41. Given user "user0" exists
  42. And user "user1" exists
  43. And As an "user0"
  44. And user "user0" created a folder "/local_storage/foo1"
  45. When User "user0" moved file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt"
  46. Then as "user1" the file "/local_storage/foo1/textfile0.txt" exists
  47. And as "user0" the file "/local_storage/foo1/textfile0.txt" exists
  48. Scenario: Move a file out of the storage works
  49. Given user "user0" exists
  50. And user "user1" exists
  51. And As an "user0"
  52. And user "user0" created a folder "/local_storage/foo2"
  53. And User "user0" moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt"
  54. When User "user1" moved file "/local_storage/foo2/textfile0.txt" to "/local.txt"
  55. Then as "user1" the file "/local_storage/foo2/textfile0.txt" does not exist
  56. And as "user0" the file "/local_storage/foo2/textfile0.txt" does not exist
  57. And as "user1" the file "/local.txt" exists