summaryrefslogtreecommitdiffstats
path: root/apps/federation/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix(federation): always set server status to OK after successful runsPablo Zimdahl2024-08-221-0/+31
| | | | | | | | | | | | Previously if a server status got set to failure, it stayed that way until an addressbook-sync found changes. Now the server status is set to OK after each successful sync check (if that's not the case already), regardless of addressbook changes. This change also includes two new logging statements, which could help next time someone debugs this. Signed-off-by: Pablo Zimdahl <pablo@nextcloud.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-2910-223/+38
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(federation): give some time to prepare both serversArthur Schiwon2024-04-111-3/+5
| | | | | | | | | | | - when this background job runs, while the current server was not being added as trusted_server in the other instance, yet, the secret sharing would not be attempted again, without visual feedback. - the change allows 5 attempts, which gives more than 20minutes to complete. More do not really help as the endpoint is brute force protected. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix: Add bruteforce protection to federation endpointJoas Schilling2024-02-211-2/+18
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #43387 from nextcloud/fix/migrate-away-from-ilogger-in-jobsCôme Chilliet2024-02-081-1/+1
|
* Revert "Merge branch 'master' of github.com:nextcloud/server"Louis Chemineau2024-02-081-1/+1
| | | | | This reverts commit d9d60238c7aaab9c61bf2d50c15aa59bc88c8975, reversing changes made to ba3fdb0cdcfbb84f0080a2146a4ba2f01569915d.
* chore: Remove last uses of IJob::execute methodCôme Chilliet2024-02-081-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-233-4/+4
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Migrate applications away from deprecated ILoggerCôme Chilliet2023-09-212-5/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate federation application to LoggerInterfaceCôme Chilliet2023-06-261-20/+20
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #33104 from nextcloud/enhancement/add-logging-federationblizzz2022-10-011-5/+11
|\ | | | | Federation - add logging, update the server status if sync fails
| * Add logging to federationAnna Larch2022-07-271-5/+11
| | | | | | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* | Port existing server code to new interfaceCarl Schwan2022-08-081-7/+6
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix many issues with the testsCarl Schwan2022-06-285-106/+80
| | | | | | | - Return type were not correct - willReturn and with confusion Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Cleanup CardDav SyncServiceCarl Schwan2022-06-241-3/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Summer cleanup of the federation appCarl Schwan2022-06-242-36/+26
| | | | | | | | | | - Use IEventDispatcher instead of deprecated symfony dispatcher - Use LoggerInterface where possible - Use php 7.4 properties - Add type hinting where possible - Move federation hooks to a seperate listener Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add support for Delegation Settings for more appsCarl Schwan2021-10-151-1/+3
| | | | | | | | | * This adds support for the sharing, groupware, theming and user_ldap app * This adds some code who disapeared during a rebase in the initial delegation PR (provisioning_api) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Migrate HintException to OCPGary Kim2021-06-303-4/+4
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0410-11/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* More cleaning after auto-add removalJoas Schilling2021-04-273-124/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Drop all dead packagesChristoph Wurst2020-12-232-75/+0
| | | | | | | | Apparently we have plenty of leftover of previous sub-dependencies. Composer automatically dumps those with any future dependency update, so I'm dropping them in an atomic step. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-10/+40
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-249-0/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-1210-53/+53
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-295-0/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-107-17/+1
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-093-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-098-8/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-092-10/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-0511-12/+15
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* TO REVERT LATER: disable some DbHandlerTestRoeland Jago Douma2019-11-271-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-2710-15/+18
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-2710-11/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-2210-10/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove deprecated functions from SecureRandomRoeland Jago Douma2018-12-071-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* improve error reporting and move format parameter to the optionsBjoern Schiessle2018-04-253-57/+18
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-6/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Catch the errors related to untrusted self signed certificates for federationRoeland Jago Douma2017-12-112-0/+76
| | | | | | * Added tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Actually set the status so we don't cause another exceptionRoeland Jago Douma2017-11-292-0/+76
| | | | | | * And add tests so I don't mess up again Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-068-0/+13
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ITimeFactoryRoeland Jago Douma2017-08-014-71/+181
| | | | | | | * Inject the timefacotry so we can mock it properly in the tests. * Extended unit tests to cover the new paths Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* we don't need to remove the job manually here, even if we ask once more the ↵Bjoern Schiessle2017-08-011-2/+0
| | | | | | other server will decline and the background job will be removed Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* update unit testsBjoern Schiessle2017-08-012-12/+34
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* expire requestSharedSecret job after 30 daysBjoern Schiessle2017-08-011-2/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* expire getShareadSecret job after 30 daysBjoern Schiessle2017-08-011-10/+18
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* adjust existing testsBjoern Schiessle2017-04-113-8/+38
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* only execute code if exception was thrown by the corresponding controllerBjoern Schiessle2017-03-241-3/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* don't add server automatically to trusted serverBjoern Schiessle2016-11-171-1/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Fix deprecated getMock call in Federation appRoeland Jago Douma2016-08-316-29/+33
|