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 37c5236
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 39 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-20230403200528-1a86ab992547
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-20230403200528-1a86ab992547 h1:1zkjCS4skobaEBGKvbFFZMZKipS9BwckzY8gD6+5Pd4=
github.com/micbar/reva/v2 v2.0.0-20230403200528-1a86ab992547/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
40 changes: 5 additions & 35 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 "0" 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 "0" element
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element

@files_sharing-app-required
Expand Down Expand Up @@ -332,9 +332,7 @@ Feature: dav-versions
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"
Then the HTTP status code should be "403"

@files_sharing-app-required
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharer
Expand All @@ -349,19 +347,6 @@ 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
Expand All @@ -375,19 +360,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 +400,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 +451,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 @@ -503,7 +474,6 @@ 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


Expand Down

0 comments on commit 37c5236

Please sign in to comment.