Skip to content

Commit

Permalink
Merge pull request #35583 from owncloud/acceptance-tests-for-10-2-1-2…
Browse files Browse the repository at this point in the history
…0190618

[release-10.2.1] Acceptance tests changes 20190618
  • Loading branch information
patrickjahns authored Jun 19, 2019
2 parents 470f781 + 4756723 commit 2dc2883
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 91 deletions.
2 changes: 2 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,8 @@ matrix:
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true
USE_EMAIL: true
USE_FEDERATED_SERVER: true
FEDERATION_OC_VERSION: daily-stable10-qa

- PHP_VERSION: 7.1
TEST_SUITE: selenium
Expand Down
12 changes: 8 additions & 4 deletions tests/acceptance/features/apiProvisioning-v1/editUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ Feature: edit users
| email | brand-new-user@example.com |
And the email address of user "brand-new-user" should be "brand-new-user@example.com"

Scenario: a normal user should be able to change their display name
Scenario Outline: a normal user should be able to change their display name
Given user "brand-new-user" has been created with default attributes and skeleton files
When user "brand-new-user" changes the display name of user "brand-new-user" to "Alan Border" using the provisioning API
When user "brand-new-user" changes the display name of user "brand-new-user" to "<display-name>" using the provisioning API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the attributes of user "brand-new-user" returned by the API should include
| displayname | Alan Border |
And the display name of user "brand-new-user" should be "Alan Border"
| displayname | <display-name> |
And the display name of user "brand-new-user" should be "<display-name>"
Examples:
| display-name |
| Alan Border |
| Phil Cyclist 🚴 |

Scenario: a normal user should not be able to change their quota
Given user "brand-new-user" has been created with default attributes and skeleton files
Expand Down
12 changes: 8 additions & 4 deletions tests/acceptance/features/apiProvisioning-v2/editUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ Feature: edit users
| email | brand-new-user@example.com |
And the email address of user "brand-new-user" should be "brand-new-user@example.com"

Scenario: a normal user should be able to change their display name
Scenario Outline: a normal user should be able to change their display name
Given user "brand-new-user" has been created with default attributes and skeleton files
When user "brand-new-user" changes the display name of user "brand-new-user" to "Alan Border" using the provisioning API
When user "brand-new-user" changes the display name of user "brand-new-user" to "<display-name>" using the provisioning API
Then the OCS status code should be "200"
And the HTTP status code should be "200"
And the attributes of user "brand-new-user" returned by the API should include
| displayname | Alan Border |
And the display name of user "brand-new-user" should be "Alan Border"
| displayname | <display-name> |
And the display name of user "brand-new-user" should be "<display-name>"
Examples:
| display-name |
| Alan Border |
| Phil Cyclist 🚴 |

Scenario: a normal user should not be able to change their quota
Given user "brand-new-user" has been created with default attributes and skeleton files
Expand Down
32 changes: 32 additions & 0 deletions tests/acceptance/features/apiShareManagement/reShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,38 @@ Feature: sharing
| 1 | 200 |
| 2 | 404 |

@issue-enterprise-3364
Scenario Outline: increasing permissions of a public link from a sub-folder of a share with share+read only permissions is not allowed
Given using OCS API version "<ocs_api_version>"
And user "user0" has created folder "/test"
And user "user0" has created folder "/test/sub"
And user "user0" has shared folder "/test" with user "user1" with permissions 17
And user "user1" has created a public link share with settings
| path | /test/sub |
| permissions | 1 |
| publicUpload | false |
And publicly uploading a file should not work
When user "user1" updates the last share using the sharing API with
| permissions | 15 |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
#Then the OCS status code should be "404"
#And the HTTP status code should be "<http_status_code>"
And publicly uploading a file should work
#And publicly uploading a file should not work
# Delete the following 4 steps when fixing the issue:
And the public should be able to upload file "file.txt" with content "some text" to the last public shared folder
And as "user0" file "/test/sub/file.txt" should exist
And as "user1" file "/test/sub/file.txt" should exist
And the content of file "/test/sub/file.txt" for user "user0" should be "some text"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
#| ocs_api_version | http_status_code |
#| 1 | 200 |
#| 2 | 404 |

Scenario Outline: resharing a file is not allowed when allow resharing has been disabled
Given using OCS API version "<ocs_api_version>"
And user "user2" has been created with default attributes and without skeleton files
Expand Down
8 changes: 7 additions & 1 deletion tests/acceptance/features/bootstrap/Provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,12 @@ public function theseUsersHaveBeenCreated($setDefaultAttributes, $doNotInitializ
// We add all the request objects in an array so that we can send all the requests in parallel.
$requests = [];
$client = new Client();

if (\getenv("TEST_EXTERNAL_USER_BACKENDS") === "true") {
echo "creating LDAP users is not implemented, so assume they exist\n";
return;
}

foreach ($table as $row) {
$body['userid'] = $this->getActualUsername($row['username']);

Expand Down Expand Up @@ -3085,7 +3091,7 @@ public function getDisabledApps() {
*
* @return string
*/
public function popSkeletonDirectoryConfig($baseUrl) {
public function popSkeletonDirectoryConfig($baseUrl = null) {
$this->runOcc(
["config:system:get skeletondirectory"],
null, null, $baseUrl
Expand Down
Loading

0 comments on commit 2dc2883

Please sign in to comment.