From 5cb11ca6427855f52b822d2a786e54daddc62fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= <skjnldsv@protonmail.com> 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) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> --- .../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-?CICby4PsIWc<F88CW|93fJz|V$4CiPCSV1D|ujTRUi^@;-wAP8MKBxuqYrG z1=y`RZTTp|Y@W!h?Oh$i&I52Ec8{<OJlklRa++Y9SgDtdmo}BySvNN&bCahgCt>F% zimcw;^HG*h14e_>&}anYGzeb%D|6%qP5(n<Nx3ehUlbHc3e#NPRN^`|cE1B-uxc|4 z;N~S_0!H)n2HZFkLf8d5VZ;Fgbi{*qnh|-6rSId+m9+Aq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!EiumVZ8qYbm6(35Wtcy z*h|JENv?KV*5GdPVN#8K1-QoJ636d>=P}w1A(wlP(|8h3?|}^@$-=$xap;l+Ry={j zj_RwhyBmfRRejy?zDA7vr!6RI3lH<KV@1kp8dg@Os%tZXCZcZTt;L>a^x!y$s@#*+ zCKTS84xQr36QdQc0XVAUb@3JTKKg--P2F&`s=8N9V0iQZd>EpWGe0KOHU;yjaNYZ6 zrMF!*9)emX+&jcGQ^HnX9)?N&Bq1cvWG)peNh*?tE`L<XQSXYerMGBXnMK#~?&V-# zzGBpqeXv}k&i4Cp=+uZ#JPDm%9edd%ZB_9uNajn@pZ{gXIR*QC)OsxSZ9m+gxn=66 zXUlSQPQ&>eBIRy+cY8pix1Irg{TZ036XA_#;VRPcrL(YAC$v=h^|<S6*g<uqZu$m# zXpj2y2RIR-xi8P`&teJHF~$r9@zkb3Q0*RX_J+ZUTvOAOu3lZ&kS?C4e!eZ($CbR+ soD?8Stf(|wa=0zkkGGo}$8j=u%Y)|PiS*^OSIjwa9+N71&aA8W7e>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<JRPQdST!P(TqSm?)zH3suxmN8@QLB~EdqY#k}*Xo<7_B+f4}wqbVvdb>=8?pi<I u-d<b}ff?tr$t`Ykhr2Af$9*2K%R?UVm?!M<lzpCYz;j;kQs;8@+WY~TQa;-N delta 176 zcmWN=ISRr+00mGcYBVm1+o*AgF)ols1RIZHXKf|kU;-aP0=5QAPY?@X4&w>L-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 3cb3d87cfb2..e5829389a46 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 ce5ceb1f642..cc207429e7b 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 9e5b029d9dc..35a5a957186 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 3f51f619629..cc326b18928 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 fb460ad850d..06503bf9bf8 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 acda220d01f..554812253f3 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'); -- GitLab