Commit Graph

514 Commits

Author SHA1 Message Date
John Molakvoæ (skjnldsv) ff895abac0
Fix shares read permissions
A user with reshare permissions on a file is now able to get any share
of that file (just like the owner).

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 21:40:30 +02:00
Daniel Calviño Sánchez 6d4f4c1c70
Add assorted integration tests for shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-04 19:25:11 +02:00
Daniel Calviño Sánchez a7526d74ae
Do not expect a 200 HTTP status code when updating a share
This will be needed to test scenarios in which updating a share return a
different HTTP status code, like 401.

The assertion for the 200 HTTP status code was added in those scenarios
that tested updating a share (that is, those that were also checking the
OCS status code), but not in those in which updating a share was just a
preparatory step for the actual test (in the same way that the HTTP
status code is not checked in those tests when creating a share).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-04 19:25:10 +02:00
John Molakvoæ (skjnldsv) 99404bdfb3
Move sharing integration tests to their own directory
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 19:25:10 +02:00
John Molakvoæ (skjnldsv) ba1ba1a55e
Add helper script to run integration tests on a Docker container
Copied and adjusted from "tests/integration/run-docker.sh" in Talk; see
its commit history for further reference.

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 19:25:10 +02:00
Christoph Wurst de6940352a Move settings to an app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 09:39:28 +00:00
Joas Schilling e4addbae3e
Better check reshare permissions when creating a share
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-03 14:00:13 +02:00
Daniel Calviño Sánchez f01a772a1a
Add integration test for increasing sub reshare permissions
The tests check an user share and a link share; there is a slight
difference in style between them as each one is based on the test above
it, which tests increasing reshare permissions.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-27 15:27:30 +02:00
Daniel Calviño Sánchez 3802174f06
Do not create folders with admin user
The admin user is not deleted after each integration test is run, so
folders created by the admin user in one test are still there when the
next tests run; tests should be independent one from each other, so a
regular user that is created and deleted for each test should be used
instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-27 15:27:30 +02:00
Arthur Schiwon 437b33ff63
add LDAP integr. test for receiving share candidates with group limitation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-14 06:23:58 +02:00
Arthur Schiwon 54299f4e66
set the ldapGroupMemberAssocAttr for group tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-05-22 12:48:12 +02:00
Julius Härtl 771ad85f85
Add integration tests for updating folder shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-04-16 15:03:52 +02:00
Arthur Schiwon a692f28320
add an integration test that ensures deletion of LDAP users
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-03-14 15:21:52 +01:00
Morris Jobke f6a12864a5
Disable failing federated sharing tests
Fails with:

 * build/integration/federation_features/federated.feature:183
 * build/integration/federation_features/federated.feature:232
 * build/integration/federation_features/federated.feature:247
 * build/integration/federation_features/federated.feature:263
<details><summary>Show full log</summary>

```
  Scenario: Reshare a federated shared file                                                             # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:183
    Given Using server "REMOTE"                                                                         # FederationContext::usingServer()
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
    And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
    And User "user1" from server "REMOTE" accepts last pending share                                    # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                           # FederationContext::usingServer()
    And As an "user1"                                                                                   # FederationContext::asAn()
    When creating a share with                                                                          # FederationContext::creatingShare()
      | path        | /textfile0 (2).txt |
      | shareType   | 0                  |
      | shareWith   | user2              |
      | permissions | 19                 |
    Then the OCS status code should be "100"                                                            # FederationContext::theOCSStatusCodeShouldBe()
      Failed asserting that SimpleXMLElement Object &000000007d8e0d3c00000000403fd08a (
          0 => '404'
      ) matches expected '100'.
    ...
{"message":"Can not find share with ID: 8"}

  Scenario: Overwrite a federated shared folder as recipient                                             # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:232
    Given Using server "REMOTE"                                                                          # FederationContext::usingServer()
    And user "user1" exists                                                                              # FederationContext::assureUserExists()
    And user "user2" exists                                                                              # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                             # FederationContext::usingServer()
    And user "user0" exists                                                                              # FederationContext::assureUserExists()
    And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE"         # FederationContext::federateSharing()
    And User "user1" from server "REMOTE" accepts last pending share                                     # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                            # FederationContext::usingServer()
    And As an "user1"                                                                                    # FederationContext::asAn()
    And User "user1" modifies text of "/textfile0.txt" with text "BLABLABLA"                             # FederationContext::modifyTextOfFile()
    When User "user1" uploads file "../../data/user1/files/textfile0.txt" to "/PARENT (2)/textfile0.txt" # FederationContext::userUploadsAFileTo()
      Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    ...
{"message":"Can not find share with ID: 10"}

  Scenario: Overwrite a federated shared file as recipient using old chunking                           # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:247
    Given Using server "REMOTE"                                                                         # FederationContext::usingServer()
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
    And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
    And User "user1" from server "REMOTE" accepts last pending share                                    # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                           # FederationContext::usingServer()
    And As an "user1"                                                                                   # FederationContext::asAn()
    And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/textfile0 (2).txt"                 # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
      Client error: `PUT http://localhost:8180/remote.php/webdav/textfile0%20(2).txt-chunking-42-3-0` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    ...
{"message":"Can not find share with ID: 11"}

  Scenario: Overwrite a federated shared folder as recipient using old chunking                  # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:263
    Given Using server "REMOTE"                                                                  # FederationContext::usingServer()
    And user "user1" exists                                                                      # FederationContext::assureUserExists()
    And user "user2" exists                                                                      # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                     # FederationContext::usingServer()
    And user "user0" exists                                                                      # FederationContext::assureUserExists()
    And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
    And User "user1" from server "REMOTE" accepts last pending share                             # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                    # FederationContext::usingServer()
    And As an "user1"                                                                            # FederationContext::asAn()
    And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/PARENT (2)/textfile0.txt"   # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
      Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt-chunking-42-3-0` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    ...
{"message":"Can not find share with ID: 12"}

```
</details>

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Arthur Schiwon 987db8e6c5
add missing config bits to integration tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-03-06 00:09:23 +01:00
Arthur Schiwon dfc7007242
with LDAP server set offline, config cannot be controlled via ocs anymore
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-03-05 23:13:49 +01:00
Arthur Schiwon 5dd2207c95
fix nested group retrieval also for 2 other cases
and also consolidate logic in one method

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-03-05 11:07:40 +01:00
Daniel Kesselberg 75b7d6ae4e
Add install logic for enable command
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-19 21:03:06 +01:00
Daniel Kesselberg 76b5f44f05
Strict Types, Return Types
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-19 21:03:06 +01:00
Daniel Kesselberg 4532ed356d
Mock name for integration test
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-04 17:12:59 +01:00
Arthur Schiwon 4bd3916445
integration test: pages search scenario with multiple bases
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-28 14:20:03 +01:00
Arthur Schiwon 91b30ada8e
typo
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-28 14:19:31 +01:00
Roeland Jago Douma e94ee7cbca
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-01 11:31:41 +01:00
dependabot[bot] 5480227525
Update sabre/dav requirement from 3.2.2 to 3.2.3 in /build/integration
Updates the requirements on [sabre/dav](https://github.com/sabre-io/dav) to permit the latest version.
- [Release notes](https://github.com/sabre-io/dav/releases)
- [Changelog](https://github.com/sabre-io/dav/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sabre-io/dav/commits/3.2.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-22 17:11:57 +00:00
Morris Jobke d867f9f091
Merge pull request #11037 from nextcloud/trash-webui-dav
Use trashbin dav endpoint to list trash in webui
2018-09-28 16:03:24 +02:00
Arthur Schiwon 108a8d6c4c
extend integration tests with users with numerical IDs
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-09-28 11:19:48 +02:00
Robin Appelman d890cd6a4c
fix sharing trashbin integration tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-20 17:03:59 +02:00
Robin Appelman d4087811e5
more trashbin integration tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-20 17:03:53 +02:00
Robin Appelman 8491c9bdc6
fix trashbin integration tests and add a few more
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-20 17:03:50 +02:00
Robin Appelman 26e2957aea
quote paths in behat.yml
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-20 17:03:47 +02:00
Robin Appelman a623e09868
remove old trashbin endpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-20 17:03:36 +02:00
Morris Jobke a6fb5c5dba
Merge pull request #10663 from nextcloud/dependabot/composer/build/integration/behat/behat-approx-3.5.0
Update behat/behat requirement from ~3.3.0 to ~3.5.0 in /build/integration
2018-08-20 17:09:04 +02:00
dependabot[bot] 9fc47bf66e
Update behat/behat requirement from ~3.3.0 to ~3.5.0 in /build/integration
Updates the requirements on [behat/behat](https://github.com/Behat/Behat) to permit the latest version.
- [Release notes](https://github.com/Behat/Behat/releases)
- [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Behat/Behat/commits/v3.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-13 01:14:46 +00:00
Arthur Schiwon 24ef41454c
don't add new LDAP configs if one is already present
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-12 23:49:59 +02:00
Arthur Schiwon 919c7b8531
improve fail info and disable cache for a case
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-12 22:45:22 +02:00
Arthur Schiwon 96f5210fc4
Phpunit changed, use proper Assert class
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-12 14:46:22 +02:00
Arthur Schiwon 59e35e3bf7
tests for user storage location
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-10 00:28:44 +02:00
Arthur Schiwon b069b13226
convert pagination tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:12 +02:00
Arthur Schiwon 0f6d98eed2
convert connection tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:12 +02:00
Arthur Schiwon f1cd4bc0c2
fix prov tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:12 +02:00
Arthur Schiwon 8808da816d
simplify tests and move some out to a new feature as we need a pristine
database for them

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:12 +02:00
Arthur Schiwon eaf352b8d1
integration test to ensure entries without displayname don't cause trouble
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:11 +02:00
Arthur Schiwon d1a8a909de
login does not save the response
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:11 +02:00
Arthur Schiwon 4e8db8aa11
convert LDAP offline and backup server integration tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:11 +02:00
Arthur Schiwon 3450ed4536
integration test checking the group filter
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:10 +02:00
Arthur Schiwon b4eeb9eff5
check user details
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:10 +02:00
Arthur Schiwon 86d145f069
behat integration tests for LDAP, basic setup
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:04 +02:00
Daniel Calviño Sánchez de403f2f3d Add integration test for creating room shares when Talk is not enabled
The test just ensures that the controller will gracefully reject the
creation instead of failing miserably; the integration tests when Talk
is enabled are in the Talk repository.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:43 +02:00
Daniel Calviño Sánchez 1e16f7ecd9 Add integration tests for searching files by comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-25 18:53:45 +02:00
Daniel Calviño Sánchez b7474ed482
Fix transfering ownership of a share to user with same id as receiver
When the ownership of a user share is transfered to the receiver the
share is removed, as the receiver now owns the original file. However,
due to a missing condition, any share with a group, link or remote with
the same id as the user was removed, not only the user shares.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 15:05:42 +02:00
Bjoern Schiessle 0c09f566c2
add some integration tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:11:49 +02:00
Joas Schilling e3b5ed602c
Fix the behat version to 3.3.*
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-09 11:10:25 +02:00
Morris Jobke 021bd261bc
Fix integration tests for Federation 2.0
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-07-04 11:23:39 +02:00
Daniel Calviño Sánchez d523777843 Extend integration tests to get the info of a group share as a sharee
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-29 08:20:19 +02:00
Daniel Calviño Sánchez b506ec1c89 Check all paths for own files and shares
Add "PARENT (2)" and its subdirectories to the paths to be checked, as
before only the own "PARENT" folder was being checked, but not the
shared one.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-28 16:45:42 +02:00
Daniel Calviño Sánchez e1c28c403d Fix filenames in sharing integration tests
When a file is shared and the receiver of the share already has a file
with the same name that file is left untouched, and "(2)" is appended to
the name of the shared file.

As "textfile0.txt" is included in the user folder skeleton all the users
in the integration test have that file, so when it is shared the
receiver sees the share as "/textfile0 (2).txt", and her own file as
"/textfile0.txt".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-28 16:36:19 +02:00
John Molakvoæ (skjnldsv) a23a6004a5
Fix integration tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-25 17:12:27 +02:00
John Molakvoæ (skjnldsv) 49d0f0c499
Fixed phpunit Test class
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-13 07:24:41 +02:00
dependabot[bot] 9a32592aca
Update phpunit/phpunit requirement to ~6.5 in /build/integration
Updates the requirements on [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) to permit the latest version.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/commits/6.5.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-13 07:24:40 +02:00
dependabot[bot] 81ccf33db4
Update guzzlehttp/guzzle requirement to 6.3.3 in /build/integration
Updates the requirements on [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) to permit the latest version.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/commits/6.3.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-05-30 09:34:25 +00:00
dependabot[bot] 354cac145c
Update sabre/dav requirement to 3.2.2 in /build/integration
Updates the requirements on [sabre/dav](https://github.com/sabre-io/dav) to permit the latest version.
- [Release notes](https://github.com/sabre-io/dav/releases)
- [Changelog](https://github.com/sabre-io/dav/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sabre-io/dav/commits/3.2.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-05-30 08:23:11 +00:00
John Molakvoæ (skjnldsv) 3e5ea9b0a9
Return proper boolean user enabled state api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-16 15:17:02 +02:00
Daniel Calviño Sánchez 1d7bf328f8
Make possible to provide "--tags=XXX" parameter to Behat
"--tags=XXX" limits the features or scenarios to be run to those
matching the tag filter expression.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-06 15:59:31 +02:00
Daniel Calviño Sánchez 65bc12960f
Add integration tests for zip32/zip64 boundaries of number of files
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-06 15:59:31 +02:00
Daniel Calviño Sánchez 6ee5469a03
Add integration tests for downloading basic zip files
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-06 15:59:31 +02:00
Daniel Calviño Sánchez 5a7986c25d
Fix use of data directory in integration tests
The data directory is not necessarily located at "../..". The proper
directory is now got by running "php console.php config:system:get
datadirectory".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-06 15:59:30 +02:00
John Molakvoæ (skjnldsv) 762002ec2e
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-05 17:11:41 +02:00
Morris Jobke 612e875f60
Merge pull request #8355 from nextcloud/fix-comments-num-index
Fix comments (and systemtags) when involving users with numerical ids
2018-02-26 17:12:57 +01:00
Arthur Schiwon 011dab246d
tests for systemtags related to numeric user ids
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-02-14 17:02:35 +01:00
Arthur Schiwon a5a0a938f2
test creating comments with numeric user ids
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-02-14 14:39:10 +01:00
Robin Appelman a815185bb4
fix redundant namespace
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-02-12 15:41:23 +01:00
Robin Appelman 359ccbc023
Adjust integration tests to new guzzle
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-02-09 17:13:30 +01:00
Thomas Müller 74df27b7a7 Add integration tests for length header on new chunking
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-12-15 14:46:44 +01:00
Robin Appelman 74b5ce8fd4
Some tests for the remote cloud api
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-12-08 16:34:33 +01:00
Morris Jobke a51a8fbcaf
Federation actually sends an email via Share 2.0
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-27 10:54:40 +01:00
Björn Schießle f347e2e4a6
Merge pull request #7047 from nextcloud/add-support-for-files-with-no-permissions
Add support for files with no permissions
2017-11-20 16:15:52 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Daniel Calviño Sánchez 555d582f35 Return whether the file is readable or not in the DAV permissions
Until now it was safe to assume that every file was readable by its
owner, so there was no need to return whether the file was readable or
not. However, with the introduction of end to end encryption that is no
longer the case, and it is now necessary to explicitly provide that
information.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-02 19:37:00 +01:00
Lukas Reschke 633396001f
Prevent sending second WWW-Authenticate header
Overrides \Sabre\DAV\Auth\Backend\AbstractBearer::challenge to prevent sending a second WWW-Authenticate header which is standard-compliant but most DAV clients simply fail hard.

Fixes https://github.com/nextcloud/server/issues/5088

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-06-13 13:54:52 +02:00
Lukas Reschke b8de3f40ee
Bearer comes first on the new endpoint
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 21:57:07 +02:00
Lukas Reschke 639ba526d0
Adjust realm from SabreDAV to Nextcloud
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 21:38:55 +02:00
Lukas Reschke f93db724d7
Make legacy DAV backend use the BearerAuth backend as well
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 21:19:39 +02:00
Lukas Reschke 538112181f
Add additional test for accessing DAV using Bearer Auth
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:11 +02:00
Lukas Reschke f2a01e1b08
Use a standardized Bearer now
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:10 +02:00
Lukas Reschke a4116220cb
Add app to autoenabled provisioning API scenario
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:08 +02:00
Morris Jobke 865cd487c4
Split up sharing-v1-part2.feature to avoid timeouts
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-02 12:55:29 -03:00
Vincent Petry d379b197d5
Fix forbidden backslash DAV integration tests 2017-04-26 15:47:59 +02:00
Sergio Bertolin a761d4cce7
Added test cases from core 16825 2017-04-26 15:29:01 +02:00
Vincent Petry 9bff66e68d
Simplified new endpoint move test 2017-04-26 15:27:02 +02:00
Vincent Petry c30feafaa2
Added case when final chunk move must not change file id 2017-04-26 15:26:15 +02:00
Sergio Bertolin 9ab17c95c0
Added test about checking file id after a move 2017-04-26 15:24:19 +02:00
Lukas Reschke 66835476b5
Add support for ratelimiting via annotations
This allows adding rate limiting via annotations to controllers, as one example:

```
@UserRateThrottle(limit=5, period=100)
@AnonRateThrottle(limit=1, period=100)
```

Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 12:00:16 +02:00
Morris Jobke 4cf4d2f27e
Favorites integration tests for shared files
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-12 11:44:57 -05:00
Joas Schilling bd37021587
Fix casing of same origin frame option
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-12 12:37:32 +02:00
Vincent Petry d1081e7940
Add integration test for trashbin
Add test for basic deletion.
Add test when deleting from shared folder as recipient.
Add test to check that metadata stays when moving out of shared folder
as recipient.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 14:59:21 -05:00
Lukas Reschke 4cf61481e5
Clear opcode cache after config change
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-11 18:57:40 +02:00
Lukas Reschke b882f65fbb
Add integration tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-11 01:39:54 +02:00
Morris Jobke 4c60360bf7 Merge pull request #4221 from nextcloud/provisioning-api-for-account-info
Allow to change account info via provisioning api
2017-04-07 12:48:44 -05:00
Joas Schilling 3d628783d9
Allow to change account info via provisioning api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-07 12:50:47 +02:00
Morris Jobke b084ceec3d Merge pull request #4224 from nextcloud/dont-list-on-public-calendar-endpoint
Don't list on public calendar endpoints
2017-04-05 20:55:39 -05:00
Lukas Reschke 63288ebc50
Don't list on public calendar endpoints
There is no need to allow listing here.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-05 22:43:05 +02:00
Lukas Reschke 1d3e391ad8
Add integration tests for token auth
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-05 17:58:33 +02:00
Robin Appelman 7d4c4224d1
fix setup of external storage integration tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 17:16:59 +02:00
Morris Jobke f9bc53146d
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-28 21:00:12 -06:00
Morris Jobke 6901b28f07
Split long running features/sharing-v1.feature into two smaller parts
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-28 16:46:56 -06:00
Roeland Jago Douma 4821c00ea8 Merge pull request #4004 from nextcloud/backport-27172
Remove SharedCache::getNumericStorageId to let CacheWrapper do it
2017-03-28 21:56:44 +02:00
Vincent Petry c54091d43b
Use authType BASIC for Sabre client in integration tests
This helps massively reduce the numerous useless 401 exceptions that
appears in the test log. These appear only because Sabre first connects
without any auth type to receive the challenge and then sends the
authentication data.

With this change it will directly use basic auth.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-24 12:40:14 -06:00
Morris Jobke 49d0507f5d Merge pull request #3879 from nextcloud/downstream-26915
Added integration tests for sharees using v2.php
2017-03-23 16:12:24 -06:00
Morris Jobke d2654c8aea Merge pull request #3965 from nextcloud/downstream-27343
Providing --path option to transfer-ownership
2017-03-23 15:20:53 -06:00
Vincent Petry 89c42a76c3
Remove SharedCache::getNumericStorageId to let CacheWrapper do it
The CacheWrapper will properly forward the call to the wrapped cache.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 00:02:48 -06:00
Robin Appelman 1e707ef1db
add integration test to ensure that shares dont overwrite external storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-22 18:00:12 +01:00
Morris Jobke 209e3e39e2
Use proper bash test syntax
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 18:48:55 -06:00
Sujith H f654f29532
Providing --path option to transfer-ownership
This will help user to selectively move the folders
specified using --path option, instead of moving
entire folder under files directory.

Signed-off-by: Sujith H <sharidasan@owncloud.com>

Update the integration test for transfer-ownership

Update the integration test for transfer-ownership
as the new option --path is introduced in the command.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 18:29:21 -06:00
Joas Schilling ce302aea11
Fix warning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 13:13:09 -06:00
Joas Schilling a8e3168c17
200 is ok
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 13:13:09 -06:00
Joas Schilling 4157e7914a
Fix deletion of groups
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 13:13:09 -06:00
Joas Schilling 4626514a35
Strict comparisons
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 13:13:09 -06:00
Sergio Bertolin 8e99f19c28
Added tests using v2.php
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 13:13:08 -06:00
Joas Schilling 5cf6fc7e8d
Add integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 10:45:27 +01:00
Sergio Bertolin 493b4c2f5c
Added logic and tests to remove everything inside a folder
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 02:19:04 -06:00
Sergio Bertolin 190ceba22f
Added functions to add files in local_storage
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 22:05:20 -06:00
Morris Jobke 4a9ce18ced Revert "Add integration test for trashbin" 2017-03-17 12:06:16 -06:00
Roeland Jago Douma 3f331e02f9 Merge pull request #3893 from nextcloud/downstream-27069
Add integration test for trashbin
2017-03-17 10:10:00 +01:00
Joas Schilling d504408efd Merge pull request #3894 from nextcloud/downstream-27008
Integration test check download without saving file locally
2017-03-17 09:17:36 +01:00
Vincent Petry 3740f9bc26
Integration test check download without saving file locally
Use Guzzle stream mode to download the contents instead of using a
temporary local file.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-16 23:57:16 -06:00
Vincent Petry 659006c234
Add integration test for trashbin
Add test for basic deletion.
Add test when deleting from shared folder as recipient.
Add test to check that metadata stays when moving out of shared folder
as recipient.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-16 23:53:58 -06:00
Lukas Reschke 9e957d0ac9
Adjust integration test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-16 20:51:40 +01:00
Roeland Jago Douma e8ac348f47
Make intergration tests work again
The regex was to greedy

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-10 20:40:47 +01:00
Phil Davis cbb735544a
Use clearer name setUpScenario
Signed-off-by: Phil Davis <phil.davis@inf.org>
2017-02-21 21:43:10 +05:45
Lukas Reschke 929648ce2c
Add integration tests for legacy DAV endpoints
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-02-10 16:18:04 +01:00
Arthur Schiwon 680fef76f8
remove outdated scenario
covered by "Delete a non-existing configuration"

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-20 23:41:20 +01:00
Arthur Schiwon 9ca4065ef5
LDAP PUT command now supports setting multiple keys at once
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-20 22:01:08 +01:00
Arthur Schiwon 08b31fcb7d
enable user_ldap app for tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-20 10:10:37 +01:00
Arthur Schiwon 1f7b08bd19
LDAP OCS Api for show config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-19 15:19:20 +01:00
Arthur Schiwon f2c9d04eac
test against OCS v2 instead
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-19 12:48:50 +01:00
Arthur Schiwon 01d469dfea
add LDAP OCS Api for modifying a configuration
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-19 11:09:04 +01:00
Arthur Schiwon 18a75bec0d
fix and extend behat tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-19 10:04:15 +01:00
Arthur Schiwon a515de54e7
LDAP OCS Api for delete config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-18 23:17:58 +01:00
Arthur Schiwon 689df9a843
LDAP OCS Api for create config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-18 21:13:23 +01:00
Roeland Jago Douma 6347d97c7f Merge pull request #2512 from nextcloud/cleanup-system-tag-usage
Only allow admins to delete tags
2017-01-06 16:17:09 +01:00
Christoph Wurst 02359c79fd
Test remember-me login
This adds a simple integration test that ensures that remembered
login works when the session cookies vanish.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-02 11:20:22 +01:00
Roeland Jago Douma 886341aca4 Merge pull request #2816 from nextcloud/changing_how_favorites_are_serialized
Return explicit values instead of boolean from sabre (#26654)
2016-12-23 14:36:05 +01:00
Sergio Bertolin aad088f3c0
Added phpdoc for getUserHome
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:25:20 +01:00
Sergio Bertolin d1b8e58c86
Using propfind instead of accessing the file system
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:25:20 +01:00
Sergio Bertolin 456d4fce1e
Changed data directory for work one
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:25:20 +01:00
Sergio Bertolin 4480dca3e3
Added support for homes which doesn't have user's name
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:25:19 +01:00
Sergio Bertolin b0a3b25724
Added functionaly for not shared elements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 12:50:15 +01:00
Sergio Bertolin fbbd833ed1
Added more favorites report cases
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 12:50:07 +01:00
Sergio Bertolin e76732c03a
Added flexibility to properties
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 12:49:57 +01:00