]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix Cron setup check tests
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 15 Jan 2024 14:05:45 +0000 (15:05 +0100)
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Tue, 16 Jan 2024 09:49:19 +0000 (10:49 +0100)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/settings/tests/Controller/CheckSetupControllerTest.php
core/js/tests/specs/setupchecksSpec.js

index cc34197c5bed21e957f8f3aae9e9d8c2b6ed4a98..d5f5915ddbab9e5deaa63a6fa7a5aa85e10bb61c 100644 (file)
@@ -42,7 +42,6 @@ use OCP\AppFramework\Http\DataResponse;
 use OCP\AppFramework\Http\RedirectResponse;
 use OCP\Http\Client\IClientService;
 use OCP\IConfig;
-use OCP\IDateTimeFormatter;
 use OCP\IL10N;
 use OCP\IRequest;
 use OCP\ITempManager;
@@ -77,8 +76,6 @@ class CheckSetupControllerTest extends TestCase {
        private $logger;
        /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
        private $checker;
-       /** @var IDateTimeFormatter|\PHPUnit\Framework\MockObject\MockObject */
-       private $dateTimeFormatter;
        /** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
        private $tempManager;
        /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
@@ -107,7 +104,6 @@ class CheckSetupControllerTest extends TestCase {
                $this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker')
                                ->disableOriginalConstructor()->getMock();
                $this->logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
-               $this->dateTimeFormatter = $this->getMockBuilder(IDateTimeFormatter::class)->getMock();
                $this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock();
                $this->notificationManager = $this->getMockBuilder(IManager::class)->getMock();
                $this->setupCheckManager = $this->createMock(ISetupCheckManager::class);
@@ -121,7 +117,6 @@ class CheckSetupControllerTest extends TestCase {
                                $this->l10n,
                                $this->checker,
                                $this->logger,
-                               $this->dateTimeFormatter,
                                $this->tempManager,
                                $this->notificationManager,
                                $this->setupCheckManager,
@@ -142,7 +137,6 @@ class CheckSetupControllerTest extends TestCase {
                        ->method('getAppValue')
                        ->willReturnMap([
                                ['files_external', 'user_certificate_scan', '', '["a", "b"]'],
-                               ['core', 'cronErrors', '', ''],
                                ['dav', 'needs_system_address_book_sync', 'no', 'no'],
                        ]);
                $this->config->expects($this->any())
@@ -215,12 +209,6 @@ class CheckSetupControllerTest extends TestCase {
 
                $expected = new DataResponse(
                        [
-                               'cronInfo' => [
-                                       'diffInSeconds' => 123,
-                                       'relativeTime' => '2 hours ago',
-                                       'backgroundJobsUrl' => 'https://example.org',
-                               ],
-                               'cronErrors' => [],
                                'isUsedTlsLibOutdated' => '',
                                'reverseProxyDocs' => 'reverse-proxy-doc-link',
                                'isCorrectMemcachedPHPModuleInstalled' => true,
@@ -248,7 +236,6 @@ class CheckSetupControllerTest extends TestCase {
                                $this->l10n,
                                $this->checker,
                                $this->logger,
-                               $this->dateTimeFormatter,
                                $this->tempManager,
                                $this->notificationManager,
                                $this->setupCheckManager,
@@ -917,7 +904,6 @@ Array
                        $this->l10n,
                        $this->checker,
                        $this->logger,
-                       $this->dateTimeFormatter,
                        $this->tempManager,
                        $this->notificationManager,
                        $this->setupCheckManager,
@@ -963,7 +949,6 @@ Array
                        $this->l10n,
                        $this->checker,
                        $this->logger,
-                       $this->dateTimeFormatter,
                        $this->tempManager,
                        $this->notificationManager,
                        $this->setupCheckManager,
index 7ed100d863b56db92996b7e0a803aabb4b5593d4..0214e589fe7ba06bfcaea376a0fd70132dbcf22e 100644 (file)
@@ -226,10 +226,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -270,10 +266,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -314,10 +306,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -358,10 +346,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: false,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -401,10 +385,6 @@ describe('OC.SetupChecks tests', function() {
                                        reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: false,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -444,10 +424,6 @@ describe('OC.SetupChecks tests', function() {
                                        reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -518,10 +494,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -567,10 +539,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: true,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -613,10 +581,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -656,10 +620,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -696,10 +656,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: false,
@@ -738,10 +694,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: false,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -780,10 +732,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
@@ -829,10 +777,6 @@ describe('OC.SetupChecks tests', function() {
                                        isFairUseOfFreePushService: true,
                                        isCorrectMemcachedPHPModuleInstalled: true,
                                        isSettimelimitAvailable: true,
-                                       cronErrors: [],
-                                       cronInfo: {
-                                               diffInSeconds: 0
-                                       },
                                        areWebauthnExtensionsEnabled: true,
                                        isMysqlUsedWithoutUTF8MB4: false,
                                        isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,