Skip to content

Commit

Permalink
Merge pull request #388 from owncloud/restoreVersion-tests
Browse files Browse the repository at this point in the history
[Tests-Only] Add restoreVersion tests for issue 387
  • Loading branch information
phil-davis authored Oct 2, 2020
2 parents 7838e07 + 2ee1490 commit 67a689f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ config = {
},

'acceptance': {
'api': {
'suites': {
'apiFilesPrimaryS3': 'apiFilesPriS3'
},
'cephS3': True,
},
'webUI': {
'suites': {
'webUIFilesPrimaryS3': 'webUIFilesPriS3'
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ default:
adminPassword: admin
ocPath: apps/testing/api/v1/occ
regularUserPassword: 123456
- WebDavPropertiesContext:
- FilesVersionsContext:

webUIFilesPrimaryS3:
paths:
Expand Down
23 changes: 23 additions & 0 deletions tests/acceptance/features/apiFilesPrimaryS3/restoreVersion.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@api @skipOnOcis-OC-Storage
Feature: propagation of etags when restoring a version of a file

Background:
Given using OCS API version "2"
And using new DAV path
And user "Alice" has been created with default attributes and without skeleton files

@issue-files_primary_s3-387
Scenario Outline: Restoring a file changes the etags of all parents
Given user "Alice" has created folder "/upload"
And user "Alice" has created folder "/upload/sub"
And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt"
And user "Alice" has uploaded file with content "changed content" to "/upload/sub/file.txt"
And user "Alice" has stored etag of element "/<element>"
When user "Alice" restores version index "1" of file "/upload/sub/file.txt" using the WebDAV API
Then the etag of element "/<element>" of user "Alice" should not have changed
# Then the etag of element "/<element>" of user "Alice" should have changed
Examples:
| element |
| |
| upload |
| upload/sub |

0 comments on commit 67a689f

Please sign in to comment.