Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests-Only] Add restoreVersion tests for issue 387 #388

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |