Initial QSfera import
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
@env-config
|
||||
Feature: create auth-app token
|
||||
As an admin
|
||||
I want to create auth-app Tokens
|
||||
So that I can use 3rd party apps
|
||||
|
||||
|
||||
Scenario: creates auth-app token via CLI
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| OC_ADD_RUN_SERVICES | auth-app |
|
||||
| PROXY_ENABLE_APP_AUTH | true |
|
||||
And user "Alice" has been created with default attributes
|
||||
When the administrator creates app token for user "Alice" with expiration time "72h" using the auth-app CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "App token created for Alice"
|
||||
@@ -0,0 +1,56 @@
|
||||
@env-config
|
||||
Feature: backup consistency
|
||||
As a user
|
||||
I want to check my data for inconsistencies
|
||||
So that I can backup my data
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
|
||||
|
||||
Scenario: check backup consistency via CLI command
|
||||
Given these users have been created with default attributes:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And user "Alice" has created folder "/uploadFolder"
|
||||
And user "Carol" has created folder "/uploadFolder"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | uploadFolder |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Editor |
|
||||
And user "Carol" has deleted file "/uploadFolder"
|
||||
And the administrator has stopped the server
|
||||
When the administrator checks the backup consistency using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "💚 No inconsistency found. The backup in '%storage_path%' seems to be valid."
|
||||
|
||||
@issue-9498 @issue-391
|
||||
Scenario: check backup consistency after uploading file multiple times via TUS
|
||||
Given user "Alice" uploads a file "filesForUpload/textfile.txt" to "/today.txt" with mtime "today" via TUS inside of the space "Personal" using the WebDAV API
|
||||
And user "Alice" uploads a file "filesForUpload/textfile.txt" to "/today.txt" with mtime "today" via TUS inside of the space "Personal" using the WebDAV API
|
||||
And user "Alice" uploads a file "filesForUpload/textfile.txt" to "/today.txt" with mtime "today" via TUS inside of the space "Personal" using the WebDAV API
|
||||
And the administrator has stopped the server
|
||||
When the administrator checks the backup consistency using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "💚 No inconsistency found. The backup in '%storage_path%' seems to be valid."
|
||||
And the administrator has started the server
|
||||
When user "Alice" gets the number of versions of file "today.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "2"
|
||||
|
||||
@issue-9498 @issue-428
|
||||
Scenario: check backup consistency after uploading a file multiple times
|
||||
Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And the administrator has stopped the server
|
||||
When the administrator checks the backup consistency using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "💚 No inconsistency found. The backup in '%storage_path%' seems to be valid."
|
||||
And the administrator has started the server
|
||||
When user "Alice" gets the number of versions of file "/textfile0.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "2"
|
||||
@@ -0,0 +1,24 @@
|
||||
@env-config
|
||||
Feature: delete empty trash bin folder via CLI command
|
||||
|
||||
|
||||
Scenario: delete empty trashbin folders
|
||||
Given the user "Admin" has created a new user with the following attributes:
|
||||
| userName | Alice |
|
||||
| displayName | Alice Hansen |
|
||||
| password | %alt1% |
|
||||
And user "Alice" has created the following folders
|
||||
| path |
|
||||
| folder-to-delete |
|
||||
| folder-to-restore |
|
||||
And user "Alice" has uploaded file with content "test file" to "testfile.txt"
|
||||
And user "Alice" has deleted the following resources
|
||||
| path |
|
||||
| folder-to-delete |
|
||||
| folder-to-restore |
|
||||
| testfile.txt |
|
||||
And user "Alice" has restored the folder with original path "folder-to-restore"
|
||||
And user "Alice" has deleted the folder with original path "folder-to-delete" from the trashbin
|
||||
And the administrator has stopped the server
|
||||
When the administrator deletes the empty trashbin folders using the CLI
|
||||
Then the command should be successful
|
||||
@@ -0,0 +1,64 @@
|
||||
@env-config
|
||||
Feature: remove file versions via CLI command
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
|
||||
|
||||
Scenario: remove all file versions
|
||||
Given user "Alice" has uploaded file with content "This is version 1" to "textfile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 2" to "textfile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 3" to "textfile.txt"
|
||||
When the administrator removes all the file versions using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "✅ Deleted 2 revisions (6 files / 2 blobs)"
|
||||
When user "Alice" gets the number of versions of file "textfile.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "0"
|
||||
|
||||
|
||||
Scenario: remove all versions of file using file-id
|
||||
Given user "Alice" has uploaded file with content "This is version 1" to "randomFile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 2" to "randomFile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 3" to "randomFile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 1" to "anotherFile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 2" to "anotherFile.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 3" to "anotherFile.txt"
|
||||
When the administrator removes the versions of file "randomFile.txt" of user "Alice" from space "Personal" using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "✅ Deleted 2 revisions (6 files / 2 blobs)"
|
||||
When user "Alice" gets the number of versions of file "randomFile.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "0"
|
||||
When user "Alice" gets the number of versions of file "anotherFile.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "2"
|
||||
|
||||
|
||||
Scenario: remove all versions of files from a space
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And using spaces DAV path
|
||||
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded file with content "This is version 1" to "file.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 2" to "file.txt"
|
||||
And user "Alice" has uploaded file with content "This is version 3" to "file.txt"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 1" to "lorem.txt"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 2" to "lorem.txt"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 3" to "lorem.txt"
|
||||
And we save it into "LOREM_FILEID"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 1" to "epsum.txt"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 2" to "epsum.txt"
|
||||
And user "Alice" has uploaded a file inside space "projectSpace" with content "This is version 3" to "epsum.txt"
|
||||
And we save it into "EPSUM_FILEID"
|
||||
When the administrator removes the file versions of space "projectSpace" using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "✅ Deleted 4 revisions (12 files / 4 blobs)"
|
||||
When user "Alice" gets the number of versions of file "file.txt"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "2"
|
||||
When user "Alice" gets the number of versions of file "lorem.txt" using file-id "<<LOREM_FILEID>>"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "0"
|
||||
When user "Alice" gets the number of versions of file "epsum.txt" using file-id "<<EPSUM_FILEID>>"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "0"
|
||||
@@ -0,0 +1,55 @@
|
||||
@env-config
|
||||
Feature: reset user password via CLI command
|
||||
|
||||
|
||||
Scenario: reset user password
|
||||
Given the user "Admin" has created a new user with the following attributes:
|
||||
| userName | Alice |
|
||||
| displayName | Alice Hansen |
|
||||
| password | %alt1% |
|
||||
And the administrator has stopped the server
|
||||
When the administrator resets the password of existing user "Alice" to "newpass" using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "Password for user 'uid=Alice,ou=users,o=libregraph-idm' updated."
|
||||
But the command output should not contain "Failed to update user password: entry does not exist"
|
||||
And the administrator has started the server
|
||||
And user "Alice" should be able to create folder "newFolder" using password "newpass"
|
||||
But user "Alice" should not be able to log in with wrong password "%alt1%"
|
||||
|
||||
|
||||
Scenario: try to reset password of non-existing user
|
||||
Given the administrator has stopped the server
|
||||
When the administrator resets the password of non-existing user "Alice" to "newpass" using the CLI
|
||||
Then the command should be successful
|
||||
But the command output should contain "Failed to update user password: entry does not exist"
|
||||
|
||||
|
||||
Scenario: reset password of admin user
|
||||
Given the user "Admin" has created a new user with the following attributes:
|
||||
| userName | Alice |
|
||||
| displayName | Alice Hansen |
|
||||
| password | %alt1% |
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And the administrator has stopped the server
|
||||
When the administrator resets the password of existing user "Alice" to "newpass" using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "Password for user 'uid=Alice,ou=users,o=libregraph-idm' updated."
|
||||
But the command output should not contain "Failed to update user password: entry does not exist"
|
||||
And the administrator starts the server
|
||||
And user "Alice" using password "newpass" should be able to create a new user "Brian" with default attributes
|
||||
|
||||
|
||||
Scenario: reset password after renaming the admin user
|
||||
Given the user "Admin" has created a new user with the following attributes:
|
||||
| userName | Alice |
|
||||
| displayName | Alice Hansen |
|
||||
| password | %alt1% |
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has changed the username to "superUser"
|
||||
And the administrator has stopped the server
|
||||
When the administrator resets the password of existing user "superUser" to "newpass" using the CLI
|
||||
Then the command should be successful
|
||||
And the command output should contain "Password for user 'uid=superUser,ou=users,o=libregraph-idm' updated."
|
||||
But the command output should not contain "Failed to update user password: entry does not exist"
|
||||
And the administrator starts the server
|
||||
And user "superUser" using password "newpass" should be able to create a new user "Brian" with default attributes
|
||||
@@ -0,0 +1,34 @@
|
||||
@env-config
|
||||
Feature: reindex space via CLI command
|
||||
As an admin
|
||||
I want to reindex space
|
||||
So that I can improve search performance by ensuring that the index is up-to-date
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
And using spaces DAV path
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some data" to "textfile.txt"
|
||||
|
||||
@issue-10329
|
||||
Scenario: reindex all spaces
|
||||
When the administrator reindexes all spaces using the CLI
|
||||
Then the command should be successful
|
||||
When user "Alice" searches for "textfile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the search result of user "Alice" should contain only these entries:
|
||||
| textfile.txt |
|
||||
|
||||
|
||||
Scenario: reindex a space
|
||||
Given using spaces DAV path
|
||||
And user "Alice" has created the following tags for file "textfile.txt" of the space "new-space":
|
||||
| tag1 |
|
||||
And user "Alice" has removed the following tags for file "textfile.txt" of space "new-space":
|
||||
| tag1 |
|
||||
When the administrator reindexes a space "new-space" using the CLI
|
||||
Then the command should be successful
|
||||
When user "Alice" searches for "Tags:tag1" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the search result should contain "0" entries
|
||||
@@ -0,0 +1,152 @@
|
||||
@env-config @cli-uploads-sessions
|
||||
Feature: List upload sessions via CLI command
|
||||
As a user
|
||||
I want to list the upload sessions
|
||||
So that I can manage the upload sessions
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
|
||||
|
||||
Scenario: list all upload sessions
|
||||
Given user "Alice" has uploaded file with content "uploaded content" to "/file0.txt"
|
||||
And the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file1.txt"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file2.txt"
|
||||
When the administrator lists all the upload sessions
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file1.txt |
|
||||
| file2.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file0.txt |
|
||||
|
||||
@antivirus
|
||||
Scenario: list all upload sessions that are currently in postprocessing
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| POSTPROCESSING_STEPS | virusscan |
|
||||
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
|
||||
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
|
||||
And the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file1.txt"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file2.txt"
|
||||
When the administrator lists all the upload sessions with flag "processing"
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file1.txt |
|
||||
| file2.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| virusFile.txt |
|
||||
|
||||
@antivirus
|
||||
Scenario: list all upload sessions that are infected by virus
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| POSTPROCESSING_STEPS | virusscan |
|
||||
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
|
||||
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file1.txt"
|
||||
When the administrator lists all the upload sessions with flag "has-virus"
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| virusFile.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
|
||||
|
||||
Scenario: list all expired upload sessions
|
||||
Given the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file1.txt"
|
||||
And the config "STORAGE_USERS_UPLOAD_EXPIRATION" has been set to "0"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file2.txt"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "/file3.txt"
|
||||
When the administrator lists all the upload sessions with flag "expired"
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file2.txt |
|
||||
| file3.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
|
||||
|
||||
Scenario: clean all expired upload sessions
|
||||
Given the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file1.txt"
|
||||
And the config "STORAGE_USERS_UPLOAD_EXPIRATION" has been set to "0"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file2.txt"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file3.txt"
|
||||
When the administrator cleans upload sessions with the following flags:
|
||||
| expired |
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file2.txt |
|
||||
| file3.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
|
||||
|
||||
Scenario: restart upload sessions that are in postprocessing
|
||||
Given user "Alice" has uploaded file with content "upload content" to "/file1.txt"
|
||||
And the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file2.txt"
|
||||
When the administrator restarts the upload sessions that are in postprocessing
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file2.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
|
||||
|
||||
Scenario: restart upload sessions of a single file
|
||||
Given the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file1.txt"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file2.txt"
|
||||
When the administrator restarts the upload sessions of file "file1.txt"
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| file1.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file2.txt |
|
||||
|
||||
@antivirus
|
||||
Scenario: clean all upload sessions that are not in post-processing
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| POSTPROCESSING_STEPS | virusscan |
|
||||
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
|
||||
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
|
||||
And the config "POSTPROCESSING_DELAY" has been set to "10s"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file1.txt"
|
||||
When the administrator cleans upload sessions with the following flags:
|
||||
| processing=false |
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| virusFile.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
|
||||
@antivirus
|
||||
Scenario: clean upload sessions that are not in post-processing and is not virus infected
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| POSTPROCESSING_STEPS | virusscan |
|
||||
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
|
||||
| POSTPROCESSING_DELAY | 10s |
|
||||
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt"
|
||||
And user "Alice" has uploaded file with content "upload content" to "/file1.txt"
|
||||
And user "Alice" has created a new TUS resource in the space "Personal" with the following headers:
|
||||
| Upload-Length | 10 |
|
||||
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
|
||||
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
|
||||
| Tus-Resumable | 1.0.0 |
|
||||
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
|
||||
When the administrator cleans upload sessions with the following flags:
|
||||
| processing=false |
|
||||
| has-virus=false |
|
||||
Then the command should be successful
|
||||
And the CLI response should contain these entries:
|
||||
| textFile.txt |
|
||||
And the CLI response should not contain these entries:
|
||||
| file1.txt |
|
||||
| virusFile.txt |
|
||||
Reference in New Issue
Block a user