Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Cron setup check tests
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 18, 2024
commit d5c9d6037fcd5badcc547fb112ad13fa149b5114
15 changes: 0 additions & 15 deletions apps/settings/tests/Controller/CheckSetupControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -107,7 +104,6 @@ protected function setUp(): void {
$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);
Expand All @@ -121,7 +117,6 @@ protected function setUp(): void {
$this->l10n,
$this->checker,
$this->logger,
$this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
Expand All @@ -142,7 +137,6 @@ public function testCheck() {
->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())
Expand Down Expand Up @@ -215,12 +209,6 @@ public function testCheck() {

$expected = new DataResponse(
[
'cronInfo' => [
'diffInSeconds' => 123,
'relativeTime' => '2 hours ago',
'backgroundJobsUrl' => 'https://example.org',
],
'cronErrors' => [],
'isUsedTlsLibOutdated' => '',
'reverseProxyDocs' => 'reverse-proxy-doc-link',
'isCorrectMemcachedPHPModuleInstalled' => true,
Expand Down Expand Up @@ -248,7 +236,6 @@ public function testGetCurlVersion() {
$this->l10n,
$this->checker,
$this->logger,
$this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
Expand Down Expand Up @@ -917,7 +904,6 @@ public function testIsMysqlUsedWithoutUTF8MB4(string $db, bool $useUTF8MB4, bool
$this->l10n,
$this->checker,
$this->logger,
$this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
Expand Down Expand Up @@ -963,7 +949,6 @@ public function testIsEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed(string $m
$this->l10n,
$this->checker,
$this->logger,
$this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
Expand Down
56 changes: 0 additions & 56 deletions core/js/tests/specs/setupchecksSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down