Skip to content

Commit

Permalink
Runs acceptance tests as user 'meta'
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Sep 3, 2018
1 parent 601b8a9 commit a1f9160
Show file tree
Hide file tree
Showing 48 changed files with 865 additions and 865 deletions.
84 changes: 42 additions & 42 deletions tests/acceptance/features/apiMain/quota.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Feature: quota

Scenario Outline: Uploading a file as owner having enough quota
Given using <dav_version> DAV path
And user "user0" has been created
And the quota of user "user0" has been set to "10 MB"
When user "user0" uploads file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "meta" has been created
And the quota of user "meta" has been set to "10 MB"
When user "meta" uploads file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "201"
Examples:
| dav_version |
Expand All @@ -19,22 +19,22 @@ Feature: quota
@smokeTest
Scenario Outline: Uploading a file as owner having insufficient quota
Given using <dav_version> DAV path
And user "user0" has been created
And the quota of user "user0" has been set to "20 B"
When user "user0" uploads file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "meta" has been created
And the quota of user "meta" has been set to "20 B"
When user "meta" uploads file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "507"
And as "user0" the file "/testquota.txt" should not exist
And as "meta" the file "/testquota.txt" should not exist
Examples:
| dav_version |
| old |
| new |

Scenario Outline: Overwriting a file as owner having enough quota
Given using <dav_version> DAV path
And user "user0" has been created
And the quota of user "user0" has been set to "10 MB"
And user "user0" has uploaded file with content "test" to "/testquota.txt"
When user "user0" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "meta" has been created
And the quota of user "meta" has been set to "10 MB"
And user "meta" has uploaded file with content "test" to "/testquota.txt"
When user "meta" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be between "201" and "204"
Examples:
| dav_version |
Expand All @@ -43,12 +43,12 @@ Feature: quota

Scenario Outline: Overwriting a file as owner having insufficient quota
Given using <dav_version> DAV path
And user "user0" has been created
And the quota of user "user0" has been set to "20 B"
And user "user0" has uploaded file with content "test" to "/testquota.txt"
When user "user0" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "meta" has been created
And the quota of user "meta" has been set to "20 B"
And user "meta" has uploaded file with content "test" to "/testquota.txt"
When user "meta" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "507"
And as "user0" the file "/testquota.txt" should not exist
And as "meta" the file "/testquota.txt" should not exist
Examples:
| dav_version |
| old |
Expand All @@ -58,13 +58,13 @@ Feature: quota

Scenario Outline: Uploading a file in received folder having enough quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "20 B"
And the quota of user "meta" has been set to "20 B"
And the quota of user "user1" has been set to "10 MB"
And user "user1" has created a folder "/testquota"
And user "user1" has shared folder "/testquota" with user "user0" with permissions 31
When user "user0" uploads file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared folder "/testquota" with user "meta" with permissions 31
When user "meta" uploads file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "201"
Examples:
| dav_version |
Expand All @@ -73,30 +73,30 @@ Feature: quota

Scenario Outline: Uploading a file in received folder having insufficient quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "10 MB"
And the quota of user "meta" has been set to "10 MB"
And the quota of user "user1" has been set to "20 B"
And user "user1" has created a folder "/testquota"
And user "user1" has shared folder "/testquota" with user "user0" with permissions 31
When user "user0" uploads file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared folder "/testquota" with user "meta" with permissions 31
When user "meta" uploads file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "507"
And as "user0" the file "/testquota/testquota.txt" should not exist
And as "meta" the file "/testquota/testquota.txt" should not exist
Examples:
| dav_version |
| old |
| new |

Scenario Outline: Overwriting a file in received folder having enough quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "20 B"
And the quota of user "meta" has been set to "20 B"
And the quota of user "user1" has been set to "10 MB"
And user "user1" has created a folder "/testquota"
And user "user1" has uploaded file with content "test" to "/testquota/testquota.txt"
And user "user1" has shared folder "/testquota" with user "user0" with permissions 31
When user "user0" overwrites file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared folder "/testquota" with user "meta" with permissions 31
When user "meta" overwrites file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be between "201" and "204"
Examples:
| dav_version |
Expand All @@ -105,16 +105,16 @@ Feature: quota

Scenario Outline: Overwriting a file in received folder having insufficient quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "10 MB"
And the quota of user "meta" has been set to "10 MB"
And the quota of user "user1" has been set to "20 B"
And user "user1" has created a folder "/testquota"
And user "user1" has uploaded file with content "test" to "/testquota/testquota.txt"
And user "user1" has shared folder "/testquota" with user "user0" with permissions 31
When user "user0" overwrites file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared folder "/testquota" with user "meta" with permissions 31
When user "meta" overwrites file "data/textfile.txt" to "/testquota/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "507"
And as "user0" the file "/testquota/testquota.txt" should not exist
And as "meta" the file "/testquota/testquota.txt" should not exist
Examples:
| dav_version |
| old |
Expand All @@ -124,13 +124,13 @@ Feature: quota

Scenario Outline: Overwriting a received file having enough quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "20 B"
And the quota of user "meta" has been set to "20 B"
And the quota of user "user1" has been set to "10 MB"
And user "user1" has uploaded file with content "test" to "/testquota.txt"
And user "user1" has shared file "/testquota.txt" with user "user0" with permissions 19
When user "user0" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared file "/testquota.txt" with user "meta" with permissions 19
When user "meta" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be between "201" and "204"
Examples:
| dav_version |
Expand All @@ -139,13 +139,13 @@ Feature: quota

Scenario Outline: Overwriting a received file having insufficient quota
Given using <dav_version> DAV path
And user "user0" has been created
And user "meta" has been created
And user "user1" has been created
And the quota of user "user0" has been set to "10 MB"
And the quota of user "meta" has been set to "10 MB"
And the quota of user "user1" has been set to "20 B"
And user "user1" has moved file "/textfile0.txt" to "/testquota.txt"
And user "user1" has shared file "/testquota.txt" with user "user0" with permissions 19
When user "user0" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
And user "user1" has shared file "/testquota.txt" with user "meta" with permissions 19
When user "meta" overwrites file "data/textfile.txt" to "/testquota.txt" with all mechanisms using the WebDAV API
Then the HTTP status code of all upload responses should be "507"
Examples:
| dav_version |
Expand Down
16 changes: 8 additions & 8 deletions tests/acceptance/features/apiProvisioning-v1/addUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ So that I can give people controlled individual access to resources on the ownCl

@smokeTest
Scenario: admin creates a user
Given user "brand-new-user" has been deleted
When the administrator sends a user creation request for user "brand-new-user" password "456firstpwd" using the provisioning API
Given user "meta" has been deleted
When the administrator sends a user creation request for user "meta" password "456firstpwd" using the provisioning API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And user "brand-new-user" should exist
And user "meta" should exist

Scenario: admin tries to create an existing user
Given user "brand-new-user" has been created
When the administrator sends a user creation request for user "brand-new-user" password "456newpwd" using the provisioning API
Given user "meta" has been created
When the administrator sends a user creation request for user "meta" password "456newpwd" using the provisioning API
Then the OCS status code should be "102"
And the HTTP status code should be "200"
And the API should not return any data

Scenario: admin tries to create an existing disabled user
Given user "brand-new-user" has been created
And user "brand-new-user" has been disabled
When the administrator sends a user creation request for user "brand-new-user" password "456newpwd" using the provisioning API
Given user "meta" has been created
And user "meta" has been disabled
When the administrator sends a user creation request for user "meta" password "456newpwd" using the provisioning API
Then the OCS status code should be "102"
And the HTTP status code should be "200"
And the API should not return any data
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/apiProvisioning-v1/getUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ So that I can get information about user

@smokeTest
Scenario: admin gets existing user
Given user "brand-new-user" has been created
When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/users/brand-new-user"
Given user "meta" has been created
When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/users/meta"
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the display name returned by the API should be "brand-new-user"
And the display name returned by the API should be "meta"

Scenario: admin tries to get a not existing user
When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/users/test"
Expand Down
Loading

0 comments on commit a1f9160

Please sign in to comment.