1
0

external-storage.feature 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 storage
  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
  59. Scenario: Save an external storage with password provided by user
  60. Given Logging in using web as "admin"
  61. And logged in user creates external global storage
  62. | mountPoint | "ExternalStorageTest" |
  63. | backend | "owncloud" |
  64. | authMechanism | "password::userprovided" |
  65. | backendOptions | {"host":"http://localhost:8080","secure":false} |
  66. And fields of last external storage match with
  67. | status | 2 |
  68. When logged in user updates last external userglobal storage
  69. | backendOptions | {"user":"admin","password":"admin"} |
  70. Then fields of last external storage match with
  71. | status | 0 |
  72. Scenario: Save an external storage again with an unmodified password provided by user
  73. Given Logging in using web as "admin"
  74. And logged in user creates external global storage
  75. | mountPoint | "ExternalStorageTest" |
  76. | backend | "owncloud" |
  77. | authMechanism | "password::userprovided" |
  78. | backendOptions | {"host":"http://localhost:8080","secure":false} |
  79. And fields of last external storage match with
  80. | status | 2 |
  81. And logged in user updates last external userglobal storage
  82. | backendOptions | {"user":"admin","password":"admin"} |
  83. When logged in user updates last external userglobal storage
  84. | backendOptions | {"user":"admin","password":"__unmodified__"} |
  85. Then fields of last external storage match with
  86. | status | 0 |
  87. Scenario: Save an external storage with global credentials provided by user
  88. Given Logging in using web as "admin"
  89. And logged in user creates external global storage
  90. | mountPoint | "ExternalStorageTest" |
  91. | backend | "owncloud" |
  92. | authMechanism | "password::global::user" |
  93. | backendOptions | {"host":"http://localhost:8080","secure":false} |
  94. And fields of last external storage match with
  95. | status | 2 |
  96. When logged in user updates last external userglobal storage
  97. | backendOptions | {"user":"admin","password":"admin"} |
  98. Then fields of last external storage match with
  99. | status | 0 |
  100. Scenario: Save an external storage again with unmodified global credentials provided by user
  101. Given Logging in using web as "admin"
  102. And logged in user creates external global storage
  103. | mountPoint | "ExternalStorageTest" |
  104. | backend | "owncloud" |
  105. | authMechanism | "password::global::user" |
  106. | backendOptions | {"host":"http://localhost:8080","secure":false} |
  107. And fields of last external storage match with
  108. | status | 2 |
  109. And logged in user updates last external userglobal storage
  110. | backendOptions | {"user":"admin","password":"admin"} |
  111. When logged in user updates last external userglobal storage
  112. | backendOptions | {"user":"admin","password":"__unmodified__"} |
  113. Then fields of last external storage match with
  114. | status | 0 |