diff --git a/changelog/unreleased/update-reva-to-20200826.md b/changelog/unreleased/update-reva-to-20200826.md new file mode 100644 index 0000000000..9439a67fb0 --- /dev/null +++ b/changelog/unreleased/update-reva-to-20200826.md @@ -0,0 +1,24 @@ +Enhancement: update reva to v1.2.1-0.20200826162318-c0f54e1f37ea + +- Update reva to v1.2.1-0.20200826162318-c0f54e1f37ea +- Do not swallow 'not found' errors in Stat [(reva/#1124)](https://github.com/cs3org/reva/pull/1124) +- Rewire dav files to the home storage [(reva/#1125)](https://github.com/cs3org/reva/pull/1125) +- Do not restore recycle entry on purge [(reva/#1099)](https://github.com/cs3org/reva/pull/1099) +- Allow listing the trashbin [(reva/#1091)](https://github.com/cs3org/reva/pull/1091) +- Restore and delete trash items via ocs [(reva/#1103)](https://github.com/cs3org/reva/pull/1103) +- Ensure ignoring public stray shares [(reva/#1090)](https://github.com/cs3org/reva/pull/1090) +- Ensure ignoring stray shares [(reva/#1064)](https://github.com/cs3org/reva/pull/1064) +- Minor fixes in reva cmd, gateway uploads and smtpclient [(reva/#1082)](https://github.com/cs3org/reva/pull/1082) +- Owncloud driver - propagate mtime on RemoveGrant [(reva/#1115)](https://github.com/cs3org/reva/pull/1115) +- Handle redirection prefixes when extracting destination from URL [(reva/#1111)](https://github.com/cs3org/reva/pull/1111) +- Add UID and GID in ldap auth driver [(reva/#1101)](https://github.com/cs3org/reva/pull/1101) +- Add calens check to verify changelog entries in CI [(reva/#1077)](https://github.com/cs3org/reva/pull/1077) +- Refactor Reva CLI with prompts [(reva/#1072)](https://github.com/cs3org/reva/pull/1072j) +- Get file info using fxids from EOS [(reva/#1079)](https://github.com/cs3org/reva/pull/1079) +- Update LDAP user driver [(reva/#1088)](https://github.com/cs3org/reva/pull/1088) +- System information metrics cleanup [(reva/#1114)](https://github.com/cs3org/reva/pull/1114) +- System information included in Prometheus metrics [(reva/#1071)](https://github.com/cs3org/reva/pull/1071) +- Add logic for resolving storage references over webdav [(reva/#1094)](https://github.com/cs3org/reva/pull/1094) + +https://github.com/owncloud/ocis-reva/pull/454 + diff --git a/go.mod b/go.mod index 149da9fd12..19a72db54c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/owncloud/ocis-reva go 1.13 require ( - github.com/cs3org/reva v1.1.1-0.20200819100654-dcbf0c8ea187 + github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea github.com/gofrs/uuid v3.3.0+incompatible github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect github.com/micro/cli/v2 v2.1.1 @@ -13,6 +13,7 @@ require ( github.com/owncloud/flaex v0.0.0-20200411150708-dce59891a203 github.com/owncloud/ocis-pkg/v2 v2.2.1 github.com/pelletier/go-toml v1.6.0 // indirect + github.com/prometheus/client_golang v1.7.1 // indirect github.com/restic/calens v0.2.0 github.com/spf13/viper v1.6.1 gopkg.in/ini.v1 v1.51.1 // indirect diff --git a/go.sum b/go.sum index 73c654041f..1794ffb0e2 100644 --- a/go.sum +++ b/go.sum @@ -162,8 +162,11 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/cs3org/cato v0.0.0-20200626150132-28a40e643719/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20200730121022-c4f3d4f7ddfd h1:uMaudkC7znaiIKT9rxIhoRYzrhTg1Nc78X7XEqhmjSk= github.com/cs3org/go-cs3apis v0.0.0-20200730121022-c4f3d4f7ddfd/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/go-cs3apis v0.0.0-20200810113633-b00aca449666/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.1.1-0.20200819100654-dcbf0c8ea187 h1:ZyDXH+zy5KPOH5AM5CMHP2j9dhV6bM3JQmqTfO8fxJ8= github.com/cs3org/reva v1.1.1-0.20200819100654-dcbf0c8ea187/go.mod h1:gkGtoun9QABW8k7jzAWWxB9jO64DJ1lreSzTucci/ok= +github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea h1:xVyJvR+GoaBrRJV6GnDflgm9bzkmjchCBBg0nMiHu6M= +github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea/go.mod h1:FvYB+UPpuPCw0hH42qHVR1R2atZyy69METZI/zEaST8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decker502/dnspod-go v0.2.0/go.mod h1:qsurYu1FgxcDwfSwXJdLt4kRsBLZeosEb9uq4Sy+08g= @@ -846,6 +849,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/studio-b12/gowebdav v0.0.0-20200303150724-9380631c29a1/go.mod h1:gCcfDlA1Y7GqOaeEKw5l9dOGx1VLdc/HuQSlQAaZ30s= github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1245,6 +1249,7 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 883dd16793..36ce61dfef 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -26,6 +26,7 @@ default: - FavoritesContext: - FilesVersionsContext: - PublicWebDavContext: + - TrashbinContext: - WebDavPropertiesContext: extensions: diff --git a/tests/acceptance/expected-failures-on-OC-storage.txt b/tests/acceptance/expected-failures-on-OC-storage.txt index e5185e419c..b6d70902b0 100644 --- a/tests/acceptance/expected-failures-on-OC-storage.txt +++ b/tests/acceptance/expected-failures-on-OC-storage.txt @@ -469,6 +469,8 @@ apiSharePublicLink2/uploadToPublicLinkShare.feature:273 # https://github.com/owncloud/ocis-reva/issues/286 Upload-only shares must not overwrite but create a separate file apiSharePublicLink2/uploadToPublicLinkShare.feature:273 # +# https://github.com/owncloud/product/issues/179 Propfind to trashbin endpoint requires UUID +# https://github.com/owncloud/product/issues/178 File deletion using dav gives unique string in filename in the trashbin apiTrashbin/trashbinDelete.feature:31 apiTrashbin/trashbinDelete.feature:32 apiTrashbin/trashbinDelete.feature:33 @@ -477,20 +479,18 @@ apiTrashbin/trashbinDelete.feature:37 apiTrashbin/trashbinDelete.feature:50 apiTrashbin/trashbinDelete.feature:67 # -apiTrashbin/trashbinFilesFolders.feature:21 -apiTrashbin/trashbinFilesFolders.feature:32 +# https://github.com/owncloud/product/issues/179 Propfind to trashbin endpoint requires UUID +# https://github.com/owncloud/product/issues/178 File deletion using dav gives unique string in filename in the trashbin apiTrashbin/trashbinFilesFolders.feature:44 apiTrashbin/trashbinFilesFolders.feature:45 apiTrashbin/trashbinFilesFolders.feature:60 apiTrashbin/trashbinFilesFolders.feature:61 -apiTrashbin/trashbinFilesFolders.feature:75 apiTrashbin/trashbinFilesFolders.feature:89 apiTrashbin/trashbinFilesFolders.feature:90 apiTrashbin/trashbinFilesFolders.feature:104 apiTrashbin/trashbinFilesFolders.feature:105 apiTrashbin/trashbinFilesFolders.feature:136 apiTrashbin/trashbinFilesFolders.feature:137 -apiTrashbin/trashbinFilesFolders.feature:155 apiTrashbin/trashbinFilesFolders.feature:185 apiTrashbin/trashbinFilesFolders.feature:186 apiTrashbin/trashbinFilesFolders.feature:203 @@ -501,14 +501,9 @@ apiTrashbin/trashbinFilesFolders.feature:241 apiTrashbin/trashbinFilesFolders.feature:242 apiTrashbin/trashbinFilesFolders.feature:255 apiTrashbin/trashbinFilesFolders.feature:256 -apiTrashbin/trashbinFilesFolders.feature:273 -apiTrashbin/trashbinFilesFolders.feature:274 -apiTrashbin/trashbinFilesFolders.feature:275 -apiTrashbin/trashbinFilesFolders.feature:276 -apiTrashbin/trashbinFilesFolders.feature:277 -apiTrashbin/trashbinFilesFolders.feature:278 -apiTrashbin/trashbinFilesFolders.feature:289 # +# https://github.com/owncloud/product/issues/179 Propfind to trashbin endpoint requires UUID +# https://github.com/owncloud/product/issues/178 File deletion using dav gives unique string in filename in the trashbin apiTrashbin/trashbinRestore.feature:31 apiTrashbin/trashbinRestore.feature:32 apiTrashbin/trashbinRestore.feature:62 @@ -535,8 +530,6 @@ apiTrashbin/trashbinRestore.feature:206 apiTrashbin/trashbinRestore.feature:207 apiTrashbin/trashbinRestore.feature:279 apiTrashbin/trashbinRestore.feature:280 -apiTrashbin/trashbinRestore.feature:295 -apiTrashbin/trashbinRestore.feature:310 apiTrashbin/trashbinRestore.feature:323 apiTrashbin/trashbinRestore.feature:324 apiTrashbin/trashbinRestore.feature:325 diff --git a/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature b/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature new file mode 100644 index 0000000000..c63c4f5f69 --- /dev/null +++ b/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature @@ -0,0 +1,54 @@ +@api @files_trashbin-app-required +Feature: files and folders can be deleted from the trashbin + As a user + I want to delete files and folders from the trashbin + So that I can control my trashbin space and which files are kept in that space + + Background: + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "to delete" to "/textfile0.txt" + And user "Alice" has uploaded file with content "to delete" to "/textfile1.txt" + And user "Alice" has created folder "PARENT" + And user "Alice" has created folder "PARENT/CHILD" + And user "Alice" has uploaded file with content "to delete" to "/PARENT/parent.txt" + And user "Alice" has uploaded file with content "to delete" to "/PARENT/CHILD/child.txt" + + @smokeTest + @issue-product-139 + @issue-product-178 + @issue-product-179 + Scenario Outline: Trashbin cannot be emptied + # after fixing all issues delete this Scenario and use the one from oC10 core + # because of @issue-product-178 we cannot perform this test using new dav, so only old dav is being used + Given user "Alice" has uploaded file with content "file with comma" to "sample,0.txt" + And user "Alice" has uploaded file with content "file with comma" to "sample,1.txt" + And using DAV path + And user "Alice" has deleted file "" + And user "Alice" has deleted file "" + And as "Alice" file "" should exist in the trashbin + And as "Alice" file "" should exist in the trashbin + When user "Alice" empties the trashbin using the trashbin API + Then as "Alice" the file with original path "" should exist in the trashbin + And as "Alice" the file with original path "" should exist in the trashbin + Examples: + | dav-path | filename1 | filename2 | + | old | textfile0.txt | textfile1.txt | + | old | sample,0.txt | sample,1.txt | + | new | textfile0.txt | textfile1.txt | + | new | sample,0.txt | sample,1.txt | + + @smokeTest + @issue-ocis-reva-118 + @issue-product-179 + # after fixing all issues delete this Scenario and use the one from oC10 core + Scenario: delete a single file from the trashbin + Given user "Alice" has deleted file "/textfile0.txt" + And user "Alice" has deleted file "/textfile1.txt" + And user "Alice" has deleted file "/PARENT/parent.txt" + And user "Alice" has deleted file "/PARENT/CHILD/child.txt" + When user "Alice" deletes the file with original path "textfile1.txt" from the trashbin using the trashbin API + Then the HTTP status code should be "405" + And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin + But as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin + And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin + And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin diff --git a/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinFilesFolders.feature b/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinFilesFolders.feature new file mode 100644 index 0000000000..ff8fc05e62 --- /dev/null +++ b/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinFilesFolders.feature @@ -0,0 +1,36 @@ +@api @files_trashbin-app-required +Feature: files and folders exist in the trashbin after being deleted + As a user + I want deleted files and folders to be available in the trashbin + So that I can recover data easily + + Background: + Given user "Alice" has been created with default attributes and skeleton files + + @smokeTest + @issue-product-178 + # after fixing all issues delete this Scenario and use the one from oC10 core + Scenario: deleting a file moves it to trashbin + Given using old DAV path + When user "Alice" deletes file "/textfile0.txt" using the WebDAV API + And using new DAV path + When user "Alice" deletes file "/textfile1.txt" using the WebDAV API + Then as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin + And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin + And as "Alice" file "/textfile0.txt" should not exist + And as "Alice" file "/textfile1.txt" should not exist + + @smokeTest + @issue-product-178 + # after fixing all issues delete this Scenario and use the one from oC10 core + Scenario: deleting a folder moves it to trashbin + Given user "Alice" has created folder "/tmp1" + And user "Alice" has created folder "/tmp2" + And using old DAV path + When user "Alice" deletes folder "/tmp1" using the WebDAV API + And using new DAV path + When user "Alice" deletes folder "/tmp2" using the WebDAV API + Then as "Alice" the folder with original path "/tmp1" should exist in the trashbin + And as "Alice" the folder with original path "/tmp2" should exist in the trashbin + And as "Alice" folder "/tmp1" should not exist + And as "Alice" folder "/tmp2" should not exist