From 5cb11ca6427855f52b822d2a786e54daddc62fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 14 Nov 2019 08:05:44 +0100 Subject: [PATCH] Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) Signed-off-by: npmbuildbot[bot] --- .../js/dist/files_sharing_tab.js | Bin 991640 -> 991641 bytes .../js/dist/files_sharing_tab.js.map | Bin 2508426 -> 2508426 bytes .../files_sharing/lib/AppInfo/Application.php | 1 - apps/files_sharing/tests/TestCase.php | 5 ++--- apps/files_trashbin/tests/TrashbinTest.php | 6 ++++-- apps/files_versions/tests/VersioningTest.php | 1 - tests/karma.config.js | 8 ++++++-- tests/lib/Files/EtagTest.php | 6 ++++-- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js b/apps/files_sharing/js/dist/files_sharing_tab.js index 724c903cd85794ee4bf8a98bba47b341a9e98caa..c7a7387958f4994551159cb97e3079dcb4cdcf5e 100644 GIT binary patch delta 2105 zcmY*aeQXp(6wl1w?d{#{+a9*Sm12P?(8GeayLY#D*s4_v5d&0=AAyQ(3dI&^u~@}M zu|)wvq$285AbgpiNP!~i098YyiAemYO8kgKKqHBYSU+PB(KmaF`p0B;XJ_8~z2EOQ zZ=ZU-?CICby4PsIWcF% zimcw;^HG*h14e_>&}anYGzeb%D|6%qP5(nr zpt4ScVS;)tKpd=(!}7uUbQ~7b$1*qfsi;sNh|k6JQtoE`gUe}!Mu>(%BTOSAiwebt ziIG&iw3R^GSzGqjh-S_bl8F6`M~D)I-m#N-keM-j^c5p4y?Sv`kfr5}x#ASVJC5)| zSuA8@|AEwP51(LHcCHkcrVfAmvMo#U&brJ<%bWIEAAy4{;*-(`BM97<7r` z28_0=S@l9m7o1q0&kduy=)~W)MlxU&Ns;;6aCRn(MK!QW zLEK&gC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QNVSloQmtx!SlHt^!_ux#tz(*c#&s4DWzRJR!-! zFp-(%Lz*};a?MKovD_%ZVIvF!)lR6qEXz>rIC;pE#qngB!EiumVZ8qYbm6(35Wtcy z*h|JENv?KV*5GdPVN#8K1-QoJ636d>=P}w1A(wlP(|8h3?|}^@$-=$xap;l+Ry={j zj_RwhyBmfRRejy?zDA7vr!6RI3lHa^x!y$s@#*+ zCKTS84xQr36QdQc0XVAUb@3JTKKg--P2F&`s=8N9V0iQZd>EpWGe0KOHU;yjaNYZ6 zrMF!*9)emX+&jcGQ^HnX9)?N&Bq1cvWG)peNh*?tE`LeBIRy+cY8pix1Irg{TZ036XA_#;VRPcrL(YAC$v=h^|fzrT_o{ diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js.map b/apps/files_sharing/js/dist/files_sharing_tab.js.map index 64acacdd900b7d0a1c1967bad9cccc58882a8910..40bda83585c5b42da95fe3843784e685dec71e54 100644 GIT binary patch delta 176 zcmWN=ISRr+00mGcYBVm1+o*AgF)olsEG#^VowaxX+X;LK3D_DeJwYslIgBR|drR>@ zc=8?piL-ctMz zUV6ESlobRF6i`G7Cd#P5LKQXC(RkWQiE|t&TSv+{TH>TXiStX0ZJ6D^-Y!$2yVj4l tw-?t#V8*#@a*NyC;Vw(=ai0h5@{mV7<_UW|WuIpp@SGRC)VW-}Hh-8dKG*;N diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 3cb3d87cfb..e5829389a4 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -49,7 +49,6 @@ use OCP\AppFramework\Utility\IControllerMethodReflector; use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudIdManager; -use OCP\IContainer; use OCP\Files\Config\IMountProviderCollection; use OCP\IContainer; use OCP\IGroup; diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index ce5ceb1f64..cc207429e7 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -71,9 +71,8 @@ abstract class TestCase extends \Test\TestCase { public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - $application = new Application(); - $application->registerMountProviders(); - + new Application(); + // reset backend \OC_User::clearBackends(); \OC::$server->getGroupManager()->clearBackends(); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 9e5b029d9d..35a5a95718 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -28,6 +28,7 @@ */ use OCA\Files_Trashbin\Tests; +use OCA\Files_Sharing\AppInfo\Application; /** * Class Test_Encryption @@ -67,8 +68,9 @@ class TrashbinTest extends \Test\TestCase { // clear share hooks \OC_Hook::clear('OCP\\Share'); \OC::registerShareHooks(); - $application = \OC::$server->query(\OCA\Files_Sharing\AppInfo\Application::class); - $application->registerMountProviders(); + + // init files sharing + new Application(); //disable encryption \OC::$server->getAppManager()->disableApp('encryption'); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 3f51f61962..cc326b1892 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -60,7 +60,6 @@ class VersioningTest extends \Test\TestCase { parent::setUpBeforeClass(); $application = new \OCA\Files_Sharing\AppInfo\Application(); - $application->registerMountProviders(); // create test user self::loginHelper(self::TEST_VERSIONS_USER2, true); diff --git a/tests/karma.config.js b/tests/karma.config.js index fb460ad850..06503bf9bf 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -53,10 +53,14 @@ module.exports = function(config) { // only test these files, others are not ready and mess // up with the global namespace/classes/state 'apps/files_sharing/js/app.js', - 'apps/files_sharing/js/sharedfilelist.js', 'apps/files_sharing/js/dist/additionalScripts.js', - 'apps/files_sharing/js/public.js', + 'apps/files_sharing/js/dist/files_sharing_tab.js', + 'apps/files_sharing/js/dist/files_sharing.js', + 'apps/files_sharing/js/dist/main.js', + 'apps/files_sharing/js/dist/sidebar.js', 'apps/files_sharing/js/files_drop.js', + 'apps/files_sharing/js/public.js', + 'apps/files_sharing/js/sharedfilelist.js', 'apps/files_sharing/js/templates.js', ], testFiles: ['apps/files_sharing/tests/js/*.js'] diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php index acda220d01..554812253f 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -10,6 +10,7 @@ namespace Test\Files; use OC\Files\Filesystem; use OCP\Share; +use OCA\Files_Sharing\AppInfo\Application; /** * Class EtagTest @@ -32,8 +33,9 @@ class EtagTest extends \Test\TestCase { parent::setUp(); \OC_Hook::clear('OC_Filesystem', 'setup'); - $application = new \OCA\Files_Sharing\AppInfo\Application(); - $application->registerMountProviders(); + // init files sharing + new Application(); + \OC\Share\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File'); \OC\Share\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');