Commit Graph

92 Commits

Author SHA1 Message Date
Roeland Jago Douma 061b9bb0e7
Merge pull request #18231 from nextcloud/fix/shared_version_restore
Fix restoring shared versions
2019-12-09 21:17:24 +01:00
Robin Appelman 829f4a1a1b
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-12-05 17:31:07 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
John Molakvoæ (skjnldsv) 5cb11ca642
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-02 13:08:43 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma e9c972f708
Fix share tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-20 08:08:02 +01:00
Robin Appelman ccfbee2af9
add way for version backends to programmatically specify if they should be used
this allows for backends that should only be used if specific conditions are met

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-05-21 17:14:47 +02:00
Robin Appelman 4403d771ad
modular versions api
Allows apps to register version backends for storage types
The existing versions backend is wrapped in a "legacy" backend.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-01 00:21:48 +01:00
Daniel Calviño Sánchez 661756b02a Set error expected by the DAV client for a failed move
A revert triggers a move in the DAV client, and the DAV client expects a
DAV error message to be provided by the server in case of failure; if
no error message is given the client ends trying to get an attribute
from an undefined object and "crashes".

Besides that, if the revert fails the "done" callback of the promise
(the first parameter of "then") is never called, so a "fail" callback
should be used instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-25 13:07:06 +02:00
Daniel Calviño Sánchez 24abfd8869 Wait for the promise to be fulfilled before running the next test
In Jasmine 2.5 the "it" function takes an optional parameter that should
be called when the async work is completed (returning a promise was
introduced in Jasmine 2.7, so it is not supported yet in the tests). If
the parameter is not declared then the next test is executed without
waiting for the asynchronous work in the previous one to finish, which
could cause that asynchronous work to finish while a different test is
being run.

Note that if that happens the test could still work as expected if it
relied only in local variables. However, in the case of the successful
revert tests, the stubs being checked are not the ones created when that
test was initialized, but the ones created when the next test, the
failed revert test, was initialized and the previous variables were
replaced (although the model itself calls the proper stubs, as they are
set through parameters in function calls).

Besides all that, the checks in the failed revert test were never
executed due to a different problem which will be fixed in the next
commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-25 12:25:41 +02:00
Robin Appelman ee84d83519
move versions webui over to the dav api
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-11 20:42:41 +02:00
Joas Schilling 78cc4171ee
Fix mock of ITimeFactory
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-10 12:42:20 +02:00
Joas Schilling bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +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
Morris Jobke ab36980d20
Use ::class in test mocks of dav app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 10:16:12 +02:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Roeland Jago Douma b930f32e89
Remove legacy OC_User_Backend and OC_User_Interface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 20:42:55 +02:00
Morris Jobke f8044cbbce Proper exception for upload of .htaccess file via WebDAV
* fixes #2860

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-08 20:03:41 -05:00
noveens 40228c0c2b
added quit option in commentstabview.js
added quit option in notif in app.js

added quit option in notif in file-upload.js

added quit option in notif in fileinfomodel.js

added quit option in notif in filelist.js

added quit option in notif in filelist.js

added quit option in notif in tagsplugin.js

added quit option in notif in statusmanager.js

added quit option in notif in external.js

added quit option in notif in versionstabview.js

added quit option in notif in notification.js

changes according to the latest review.

timeout removed since there is a button to close it

translation capability added

typo fixed

test files updated

small errors fixed

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 13:12:29 -06:00
Vincent Petry 5dbb32fb81
Properly expire ext storage versions (#26601)
* Properly expire ext storage versions

System-wide external storages have no real owner so the current user is
used as owner. However when running cron.php there is no current user,
so no expiry can be done.

This fix adds an user argument to the expire() function to tell for
which user to expire files. This information is anyway always available
now through the expire command job.

* Move version expire setupFS into the expire function

* Add comment about not tearing down in version Storage::expire()

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-10 15:58:44 -06:00
Roeland Jago Douma 66a77a8857
Fix js tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-29 20:48:03 +01:00
Michael Jobst 96debafd08
Display changes in file versions tab view and detailsView (#26511)
* Display changes in file versions tab view and detailsView

* versions tab enhancements

enhanced js test file
removed css superscript attribute for version size

* Replaced spaces with tabs
2016-11-14 15:22:27 +01:00
Roeland Jago Douma 55af6b45f7
More tests
* PreviewController test
* PublicPreview test
* Versions Preview test
* Trash Preview test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00
Roeland Jago Douma 798dd40139
Fix getMock files_versions 2016-09-06 09:29:27 +02:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Joas Schilling 813f0a0f40
Fix apps/ 2016-07-21 18:13:57 +02:00
Vincent Petry f22af90c09 Hide revert button when no permission to revert 2016-06-28 13:00:58 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Joas Schilling b57f3126eb Move files_versions to PSR-4 (#24571) 2016-05-12 09:49:15 +02:00
Roeland Jago Douma 92abb5f23d
Fix tests 2016-04-19 14:04:00 +02:00
Stefan Weil 16df1c5188 apps: Fix typos (found by codespell) (#23862)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-12 12:52:51 +02:00
Robin Appelman d0dd76bb8a set watch policy in test 2016-03-21 13:53:33 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Arthur Schiwon b6e03fe261 versions provide more information when throwing hooks 2016-02-08 16:33:49 +01:00
Robin Appelman 1369f2c684 cleanup shared cache 2016-01-28 11:46:43 +01:00
Robin Appelman 5d0451b848 Safe teardowns 2016-01-14 12:54:42 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Roeland Jago Douma 1f715289bf Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
2015-12-17 16:18:40 +01:00
Thomas Müller f9fc254672 Add DB group to some files_external tests
Adding group Db to federation tests and ldap tests

Add group DB to Test_UrlGenerator

Adding group DB to trashbin and versions tests

Adding group DB to Test_Util_CheckServer for pg
2015-11-30 10:55:10 +01:00
Thomas Müller 757aa45db7 Adding more DB groups to test suits
Adding more DB groups to test suits
2015-11-30 10:55:06 +01:00
Robin Appelman a95d4c2b22 update tests 2015-11-19 13:32:04 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Robin Appelman d749b9a5ac Fix rename shared versions test 2015-10-16 21:41:51 +02:00
Jörn Friedrich Dreyer 5646e39248 test objectstore with ceph docker
use default config for swift primary storage test config

allow testsuite to complete

fix timeout, script cleanup, enable debug for now

use btrfs loopback device, requires privileged container and absolute path

throw exception when storage has problems

debug by echo ...

sleep more, more debug
2015-10-06 16:27:25 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00