fix: get test suites for core api tests

remove oc10 specific test suites

provide behat config with make command

fix typo

add missing helpers
This commit is contained in:
Saw-jan
2023-01-05 09:23:30 +05:45
committed by Phil Davis
parent 048557712e
commit 42fb4a68e4
168 changed files with 2058 additions and 21135 deletions
@@ -1,28 +0,0 @@
@api @skipOnOcis
Feature: COPY file/folder
As a user
I want to copy a file or folder
So that I can duplicate it
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario: send COPY requests to webDav endpoints with body as normal user
When user "Alice" requests these endpoints with "COPY" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/webdav/textfile0.txt |
| /remote.php/dav/files/%username%/textfile0.txt |
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/webdav/PARENT/parent.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "403"
@@ -1,35 +0,0 @@
@api @notToImplementOnOCIS
Feature: usernames are case-insensitive in webDAV requests with app passwords
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
@skipOnOcV10.10.0
Scenario: send PUT requests to webDav endpoints using app password token as password and lowercase of username
Given token auth has been enforced
And a new browser session for "Alice" has been started
And the user has generated a new app password named "my-client"
When the user "alice" requests these endpoints with "PUT" with body "doesnotmatter" using basic auth and generated app password about user "Alice"
| endpoint |
| /remote.php/webdav/textfile0.txt |
| /remote.php/dav/files/%username%/textfile1.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "204"
When the user "alice" requests these endpoints with "PUT" with body "doesnotmatter" using basic auth and generated app password about user "Alice"
| endpoint |
# this folder is created, so gives 201 - CREATED
| /remote.php/webdav/PARENS |
| /remote.php/dav/files/%username%/FOLDERS |
Then the HTTP status code of responses on all endpoints should be "201"
When the user "alice" requests these endpoints with "PUT" with body "doesnotmatter" using basic auth and generated app password about user "Alice"
| endpoint |
# this folder already exists so gives 409 - CONFLICT
| /remote.php/dav/files/%username%/FOLDER |
Then the HTTP status code of responses on all endpoints should be "409"
@@ -1,24 +0,0 @@
@api @notToImplementOnOCIS
Feature: delete file/folder
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario: send DELETE requests to webDav endpoints with body as normal user
When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/webdav/textfile0.txt |
| /remote.php/dav/files/%username%/textfile1.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/FOLDER |
Then the HTTP status code of responses on all endpoints should be "204"
@@ -1,30 +0,0 @@
@api @skipOnOcis
Feature: create folder using MKCOL
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario: send MKCOL requests to another user's webDav endpoints as normal user
Given user "Brian" has been created with default attributes and without skeleton files
When user "Brian" requests these endpoints with "MKCOL" including body "" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/textfile0.txt |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/does-not-exist |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on each endpoint should be "403, 403, 403, 409" respectively
Scenario: send MKCOL requests to non-existent user's webDav endpoints as normal user
Given user "Brian" has been created with default attributes and without skeleton files
When user "Brian" requests these endpoints with "MKCOL" including body "" about user "non-existent-user"
| endpoint |
| /remote.php/dav/files/non-existent-user/textfile0.txt |
| /remote.php/dav/files/non-existent-user/PARENT |
| /remote.php/dav/files/non-existent-user/does-not-exist |
| /remote.php/dav/files/non-existent-user/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "409"
@@ -1,24 +0,0 @@
@api @notToImplementOnOCIS
Feature: MOVE file/folder
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario: send MOVE requests to webDav endpoints with body as normal user
When user "Alice" requests these endpoints with "MOVE" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/webdav/textfile0.txt |
| /remote.php/dav/files/%username%/textfile0.txt |
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/webdav/PARENT/parent.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "403"
@@ -1,23 +0,0 @@
@api @issue-39597 @skipOnOcis
Feature: get file info using PUT
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario: send PUT requests to another user's webDav endpoints as normal user
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/textfile1.txt |
| /remote.php/dav/files/%username%/PARENT |
Then the HTTP status code of responses on all endpoints should be "403"
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "409"