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] update api tests #37337

Merged
merged 1 commit into from
May 7, 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
14 changes: 7 additions & 7 deletions tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,23 @@ Feature: auth
When the user "user0" requests these endpoints with "GET" with basic auth then the status codes should be as listed
| endpoint | ocs-code | http-code |
| /ocs/v1.php/apps/files_external/api/v1/mounts | 998 | 200 |
| /ocs/v2.php/apps/files_external/api/v1/mounts | 998 | 200 |
| /ocs/v2.php/apps/files_external/api/v1/mounts | 998 | 404 |
| /ocs/v1.php/apps/files_sharing/api/v1/remote_shares | 998 | 200 |
| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares | 998 | 200 |
| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares | 998 | 404 |
| /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending | 998 | 200 |
| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending | 998 | 200 |
| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending | 998 | 404 |
# | /ocs/v1.php/apps/files_sharing/api/v1/shares | 100 | 200 |
# | /ocs/v2.php/apps/files_sharing/api/v1/shares | 100 | 200 |
| /ocs/v1.php/cloud/apps | 998 | 200 |
| /ocs/v2.php/cloud/apps | 998 | 200 |
| /ocs/v2.php/cloud/apps | 998 | 404 |
| /ocs/v1.php/cloud/groups | 998 | 200 |
| /ocs/v2.php/cloud/groups | 998 | 200 |
| /ocs/v2.php/cloud/groups | 998 | 404 |
| /ocs/v1.php/cloud/users | 403 | 200 |
| /ocs/v2.php/cloud/users | 403 | 200 |
| /ocs/v2.php/cloud/users | 403 | 403 |
| /ocs/v1.php/config | 100 | 200 |
| /ocs/v2.php/config | 100 | 200 |
| /ocs/v1.php/privatedata/getattribute | 998 | 200 |
| /ocs/v2.php/privatedata/getattribute | 998 | 200 |
| /ocs/v2.php/privatedata/getattribute | 998 | 404 |

@issue-32068 @skipOnOcis
@issue-ocis-reva-29
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Feature: cannot share resources with invalid permissions
And user "user0" has uploaded file with content "some data" to "/textfile0.txt"
And user "user0" has created folder "/PARENT"

@skipOnOcis @issue-ocis-reva-45 @issue-ocis-reva-64
Scenario Outline: Cannot create a share of a file or folder with invalid permissions
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
Expand All @@ -29,30 +28,6 @@ Feature: cannot share resources with invalid permissions
| 1 | 404 | 200 | PARENT | 32 |
| 2 | 404 | 404 | PARENT | 32 |

@skipOnOcV10 @issue-ocis-reva-45 @issue-ocis-reva-64
#after fixing all issues delete this Scenario and use the one above
Scenario Outline: Cannot create a share of a file or folder with invalid permissions
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
When user "user0" creates a share using the sharing API with settings
| path | <item> |
| shareWith | user1 |
| shareType | user |
| permissions | <permissions> |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "user1" entry "<item>" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code | item | permissions |
| 1 | 400 | 200 | textfile0.txt | 0 |
| 2 | 400 | 200 | textfile0.txt | 0 |
| 1 | 400 | 200 | PARENT | 0 |
| 2 | 400 | 200 | PARENT | 0 |
| 1 | 400 | 200 | textfile0.txt | 32 |
| 2 | 400 | 200 | textfile0.txt | 32 |
| 1 | 400 | 200 | PARENT | 32 |
| 2 | 400 | 200 | PARENT | 32 |

@skipOnOcis @issue-ocis-reva-45 @issue-ocis-reva-64
Scenario Outline: Cannot create a share of a file with a user with only create permission
Given using OCS API version "<ocs_api_version>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ Feature: sharing
| 1 | 2 | 2 | 100 |
| 2 | 2 | 2 | 100 |

@skipOnOcis
@issue-ocis-reva-45
@issue-ocis-reva-64
Scenario Outline: Creating a share of a file with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
Expand All @@ -116,24 +113,6 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |

@skipOnOcV10
@issue-ocis-reva-45
@issue-ocis-reva-64
#after fixing all issues delete this Scenario and use the one above
Scenario Outline: Creating a share of a file with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
And user "user0" has uploaded file with content "user0 file" to "randomfile.txt"
When user "user0" shares file "randomfile.txt" with user "user1" with permissions "0" using the sharing API
Then the OCS status code should be "400"
And the OCS status message should be "permissions 0 out of range 1 - 31"
And the HTTP status code should be "<http_status_code>"
And as "user1" file "randomfile.txt" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 200 |

@skipOnOcV10
@issue-ocis-reva-64
#after fixing all issues delete this Scenario or adjust it, so that it works also with oC10
Expand Down Expand Up @@ -163,7 +142,7 @@ Feature: sharing
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 200 |
| 2 | 404 |

@skipOnOcV10
@issue-ocis-reva-64
Expand All @@ -177,7 +156,7 @@ Feature: sharing
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 200 |
| 2 | 404 |

@skipOnOcis
@issue-ocis-reva-64
Expand All @@ -197,9 +176,6 @@ Feature: sharing
| 1 | 200 |
| 2 | 200 |

@skipOnOcis
@issue-ocis-reva-45
@issue-ocis-reva-64
Scenario Outline: Creating a share of a folder with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
Expand All @@ -213,24 +189,6 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |

@skipOnOcV10
@issue-ocis-reva-45
@issue-ocis-reva-64
#after fixing all issues delete this Scenario and use the one above
Scenario Outline: Creating a share of a folder with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "user1" has been created with default attributes and without skeleton files
And user "user0" has created folder "/afolder"
When user "user0" shares folder "afolder" with user "user1" with permissions "0" using the sharing API
Then the OCS status code should be "400"
And the OCS status message should be "permissions 0 out of range 1 - 31"
And the HTTP status code should be "<http_status_code>"
And as "user1" folder "afolder" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 200 |

@skipOnOcis
@issue-ocis-reva-20
@issue-ocis-reva-26
Expand Down