Skip to content

Commit

Permalink
change test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Apr 3, 2023
1 parent aec511a commit 2cd6257
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 71 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,5 @@ require (
)

replace github.com/cs3org/go-cs3apis => github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35

replace github.com/cs3org/reva/v2 => github.com/micbar/reva/v2 v2.0.0-20230403215034-66e24325ae82
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,6 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
github.com/cs3org/reva/v2 v2.12.1-0.20230331184913-eca8953fb6e9 h1:zUMD0UvKVPbR3UaodnA0GXuBycxrIuaO8Kshgi3iKKI=
github.com/cs3org/reva/v2 v2.12.1-0.20230331184913-eca8953fb6e9/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
github.com/cs3org/reva/v2 v2.12.1-0.20230403080425-f93a726ab656 h1:FAlxhUtG0/57X4i05x3suRd/rtAecM/7ZWeJ9ZtqrIc=
github.com/cs3org/reva/v2 v2.12.1-0.20230403080425-f93a726ab656/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
Expand Down Expand Up @@ -1268,6 +1264,8 @@ github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b h1:Q53idHrTuQD
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b/go.mod h1:KirJrATYGbTyUwVR26xIkaipRqRcMRXBf8N5dacvGus=
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZyWckaLfucYG6KYOXLWo4co8pZYNY=
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE=
github.com/micbar/reva/v2 v2.0.0-20230403215034-66e24325ae82 h1:ivuBEObF9BlpArq363tS2qB9w4YO+b+uO59GueepZhk=
github.com/micbar/reva/v2 v2.0.0-20230403215034-66e24325ae82/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.40/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
Expand Down
4 changes: 0 additions & 4 deletions tests/acceptance/expected-failures-API-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,6 @@ cannot share a folder with create permission
- [coreApiShareUpdateToShares/updateShare.feature:241](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L241)
- [coreApiShareUpdateToShares/updateShare.feature:242](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L242)

#### [user can access version metadata of a received share before accepting it](https://github.com/owncloud/ocis/issues/760)

- [coreApiVersions/fileVersions.feature:487](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiVersions/fileVersions.feature#L487)

#### [Share lists deleted user as 'user'](https://github.com/owncloud/ocis/issues/903)

- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:676](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L676)
Expand Down
76 changes: 13 additions & 63 deletions tests/acceptance/features/coreApiVersions/fileVersions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Feature: dav-versions
| permissions | read |
When user "Brian" accepts share "/davtest.txt" offered by user "Alice" using the sharing API
Then the HTTP status code should be "200"
And the version folder of fileId "<<FILEID>>" for user "Brian" should contain "1" element
And the version folder of fileId "<<FILEID>>" for user "Brian" should contain "-1" element

@files_sharing-app-required
Scenario: sharer of a file can see the old version information when the sharee changes the content of the file
Expand All @@ -295,7 +295,7 @@ Feature: dav-versions
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
When user "Brian" uploads file with content "Second content" to "/Shares/sharefile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "-1" element
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element

@files_sharing-app-required
Expand Down Expand Up @@ -327,20 +327,19 @@ Feature: dav-versions
Scenario: sharee can restore a file inside a shared folder modified by sharee
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/sharingfolder"
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
And user "Alice" has uploaded file with content "First content" to "/sharingfolder/sharefile.txt"
And user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
Then the version folder of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should contain "-1" elements
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "Second content"
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "Second content"

@files_sharing-app-required
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharer
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/sharingfolder"
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
Expand All @@ -349,24 +348,11 @@ Feature: dav-versions
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"

@files_sharing-app-required
Scenario: sharee can restore a file inside a shared folder created by sharee and modified by sharer
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/sharingfolder"
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"

@files_sharing-app-required
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharee
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/sharingfolder"
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
And user "Brian" has uploaded file with content "old content" to "/Shares/sharingfolder/sharefile.txt"
And user "Brian" has uploaded file with content "new content" to "/Shares/sharingfolder/sharefile.txt"
Expand All @@ -375,19 +361,6 @@ Feature: dav-versions
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"

@files_sharing-app-required
Scenario: sharee can restore a file inside a shared folder created by sharer and modified by sharer
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/sharingfolder"
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
And user "Alice" has uploaded file with content "old content" to "/sharingfolder/sharefile.txt"
And user "Alice" has uploaded file with content "new content" to "/sharingfolder/sharefile.txt"
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"

@files_sharing-app-required
Scenario: sharer can restore a file inside a group shared folder modified by sharee
Given user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -428,7 +401,6 @@ Feature: dav-versions
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data 3"
And as "<mover>" file "/testfile.txt" should not exist
And the version folder of file "/Shares/testshare/testfile.txt" for user "Alice" should contain "2" elements
And the version folder of file "/testshare/testfile.txt" for user "Brian" should contain "2" elements
Examples:
| dav_version | mover | dst-folder |
| old | Brian | /testshare |
Expand Down Expand Up @@ -480,8 +452,8 @@ Feature: dav-versions
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
Then the HTTP status code should be "207"
And the number of versions should be "3"
Then the HTTP status code should be "403"
And the number of versions should be "0"

@issue-760
Scenario: Receiver tries get file versions of shared file before receiving it
Expand All @@ -492,8 +464,8 @@ Feature: dav-versions
And we save it into "FILEID"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
Then the HTTP status code should be "404"
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"
Then the HTTP status code should be "403"
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\Forbidden"


Scenario: sharer tries get file versions of shared file when the sharee changes the content of the file
Expand All @@ -503,26 +475,4 @@ Feature: dav-versions
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharefile.txt"
Then the HTTP status code should be "204"
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element


Scenario: download old versions of a shared file as share receiver
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "1"
Then the HTTP status code should be "200"
And the following headers should be set
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
And the downloaded content should be "version 1"
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "2"
Then the HTTP status code should be "200"
And the following headers should be set
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
And the downloaded content should be "uploaded content"

0 comments on commit 2cd6257

Please sign in to comment.