Commit Graph

49 Commits

Author SHA1 Message Date
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
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>
2020-12-30 06:01:38 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Daniel Calviño Sánchez 2cc22a06b4 Add integration tests for user avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:47:56 +01:00
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>
2020-12-07 04:32:00 +01:00
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>
2020-12-07 04:32:00 +01:00
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>
2020-05-29 02:50:29 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01: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 0f6d98eed2
convert connection tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-09 23:45:12 +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
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
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
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 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01: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
Joas Schilling 4626514a35
Strict comparisons
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 13:13:09 -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
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
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
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
Roeland Jago Douma d5665eb93b
Add sleep function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 11:20:33 +01:00
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
2016-10-20 17:21:08 +02:00
Sergio Bertolín 7744cb5240
Orphaned shares test and some requirements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-06 13:57:54 +02:00
Sergio Bertolin e011065a08
Added quota calculation test when a file is recieved
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-02 21:16:50 +02:00
Sergio Bertolin 7413e2a88c
Added test checking quota after usage
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-02 21:16:49 +02:00
Roeland Jago Douma 19ecacd57e
Add basic osc intergration tests 2016-09-07 13:04:21 +02:00
Sergio Bertolín 81c18f5aa7
Creating the folder when the tests run 2016-08-30 17:23:56 +02:00
Sergio Bertolín 7106129baa
External storage was not enabled and content was not deleted before scenarios 2016-08-30 17:23:26 +02:00
Sergio Bertolin b154c8fa39
Removed extra context added needed option and remove storage after external storage scenarios 2016-08-30 17:23:13 +02:00
Roeland Jago Douma 77542817d1
Fix intergration tests
* Set OCS-APIREQUEST: true
* PUT requires a body
2016-08-14 18:34:07 +02:00
Roeland Jago Douma dd9f195afd
Add OCS-APIREQUEST header to intergration test calls 2016-08-05 14:17:32 +02:00
Morris Jobke 0529caee7c
Add some integration test fixes 2016-07-29 08:55:56 +02:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Sergio Bertolin c6a5a43009
Added tests about overwriting files and folders as recipient 2016-05-31 10:41:38 +02:00
Christoph Wurst bfed02b038
add auth integration tests 2016-05-11 13:36:46 +02:00
Christoph Wurst aa85edd224
increase token column width
add some range to time() assertions
2016-05-11 13:36:46 +02:00
Thomas Müller 68a92d36ec Use baseUrl as provided 2016-04-12 14:42:29 +02:00
Joas Schilling f62a7b2447 Only match LOCAL and REMOTE as servers, correctly make use of the sharer server from the command 2016-03-14 10:55:52 +01:00
Joas Schilling 0f214017d2 Docs for BasicStructure 2016-03-11 13:59:19 +01:00
Joas Schilling 62b77d8ed0 API version needs to be on basic because we use it there 2016-03-11 13:59:19 +01:00
Lukas Reschke 5780ba611e Add integration test for CSRF protection on DAV
This adds the integration tests for the CSRF protection on the DAV backend introduced with 9.0.

Fixes https://github.com/owncloud/core/issues/22598
2016-02-25 17:54:27 +01:00
Sergio Bertolin b99bd7f4fc Added sabre dav in webdav, modified skeleton to have parent and child folders 2015-11-27 12:55:48 +00:00
Sergio Bertolin 9d44576819 Restructured FeatureContext to reuse some parts and run two servers in parallel 2015-11-26 17:03:17 +01:00