Commit Graph

53 Commits (e23aa8883ec0dff03b973fb0bf690cb8482218cf)

Author SHA1 Message Date
Julius Härtl e23aa8883e
feat(s3): Use multipart upload for chunked uploading
This allows to stream file chunks directly to S3 during upload.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Joas Schilling a310a2adc7
Add integration tests for autocomplete/get (similar to sharees API)
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Daniel Calviño Sánchez 28f2d0ec7a Make integration tests work with both PHP 7.3 and 7.4
The "Trashbin" and "WebDav" traits were using each other in a circular
dependency ("WebDav" -> "Sharing" -> "Provisioning" -> "BasicStructure"
-> "Trashbin" -> "WebDav"). In PHP 7.3 this worked fine, but in PHP 7.4
the fatal error "Trait 'WebDav' not found in .../Trashbin.php" was
thrown. To solve this now the "TrashBin" trait no longer explicitly uses
"WebDav".

However, due to this change, the class using "TrashBin" is now expected
to also use "WebDav". As the "Trashbin" trait was not needed by most
contexts using the "BasicStructure" trait "Trashbin" was removed from it
and added only to those contexts that actually need it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Daniel Calviño Sánchez 2cc22a06b4 Add integration tests for user avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez 184742e6ff Make possible to set body in requesttoken requests in integration tests
"sendingAToWithRequesttoken" needs to be used to test some non OCS
endpoints which require the request token to be sent in the request. Now
it is possible to specify the body (or, rather, additional contents
beside the cookies and the request token) for those requests, as it will
be needed for example to upload an avatar.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez b553b43b68 Make possible to send requests as anonymous users in integration tests
Until now requests always had "auth" headers either for an admin or a
regular user, depending on the value of "currentUser". Now, if
"currentUser" starts by "anonymous" no "auth" header is sent, which
makes possible to also test requests with users not logged in.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez a2f80d4f4c Add integration tests for creating and updating a mail share
In most cases, when a mail share is created or updated an e-mail is sent
to the sharee, which is done by connecting to the SMTP server set in the
configuration. If the server can not be contacted then the creation or
update of the mail share fails.

To make possible to test mail shares without using a real SMTP server a
fake one has been added. The original script, which is MIT licensed, was
based on inetd, so it was slightly modified to run on its own.

In order to use it from the integration tests the "Given dummy mail
server is listening" step has to be called in the scenarios in which the
mail server is needed.

For now that is the only available step; things like checking the sent
mails, while possible (as the script can log the mails to certain file),
have not been added yet.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Arthur Schiwon 437b33ff63
add LDAP integr. test for receiving share candidates with group limitation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Arthur Schiwon 0f6d98eed2
convert connection tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
John Molakvoæ (skjnldsv) 49d0f0c499
Fixed phpunit Test class
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
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>
6 years ago
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>
6 years ago
Robin Appelman a815185bb4
fix redundant namespace
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Robin Appelman 359ccbc023
Adjust integration tests to new guzzle
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Robin Appelman 74b5ce8fd4
Some tests for the remote cloud api
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
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>
7 years ago
Joas Schilling 4626514a35
Strict comparisons
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Sergio Bertolin 190ceba22f
Added functions to add files in local_storage
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 4a9ce18ced Revert "Add integration test for trashbin" 7 years ago
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>
7 years ago
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>
8 years ago
Sergio Bertolin 456d4fce1e
Changed data directory for work one
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Roeland Jago Douma d5665eb93b
Add sleep function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Sergio Bertolín 0417cbafd0
Changed request to not add a prefix to the url (#26256)
* Changed request to not add a prefix to the url

* Expecting forbidden instead of service unavailable

* Handling login exceptions
8 years ago
Sergio Bertolín 7744cb5240
Orphaned shares test and some requirements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Sergio Bertolin e011065a08
Added quota calculation test when a file is recieved
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Sergio Bertolin 7413e2a88c
Added test checking quota after usage
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Roeland Jago Douma 19ecacd57e
Add basic osc intergration tests 8 years ago
Sergio Bertolín 81c18f5aa7
Creating the folder when the tests run 8 years ago
Sergio Bertolín 7106129baa
External storage was not enabled and content was not deleted before scenarios 8 years ago
Sergio Bertolin b154c8fa39
Removed extra context added needed option and remove storage after external storage scenarios 8 years ago
Roeland Jago Douma 77542817d1
Fix intergration tests
* Set OCS-APIREQUEST: true
* PUT requires a body
8 years ago
Roeland Jago Douma dd9f195afd
Add OCS-APIREQUEST header to intergration test calls 8 years ago
Morris Jobke 0529caee7c
Add some integration test fixes 8 years ago
Joas Schilling 0215b004da
Update with robin 8 years ago
Sergio Bertolin c6a5a43009
Added tests about overwriting files and folders as recipient 8 years ago
Christoph Wurst bfed02b038
add auth integration tests 8 years ago
Christoph Wurst aa85edd224
increase token column width
add some range to time() assertions
8 years ago
Thomas Müller 68a92d36ec Use baseUrl as provided 8 years ago
Joas Schilling f62a7b2447 Only match LOCAL and REMOTE as servers, correctly make use of the sharer server from the command 8 years ago
Joas Schilling 0f214017d2 Docs for BasicStructure 8 years ago
Joas Schilling 62b77d8ed0 API version needs to be on basic because we use it there 8 years ago