diff options
Diffstat (limited to 'core/js/tests/specs/setupchecksSpec.js')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 112 |
1 files changed, 19 insertions, 93 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 451c49fb2e9..c3e7fab14f1 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -236,8 +236,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -294,8 +293,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -353,8 +351,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -410,8 +407,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -465,8 +461,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: false, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -520,8 +515,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -577,8 +571,7 @@ describe('OC.SetupChecks tests', function() { reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -632,8 +625,7 @@ describe('OC.SetupChecks tests', function() { reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: false, hasFreeTypeSupport: true, missingIndexes: [], @@ -687,8 +679,7 @@ describe('OC.SetupChecks tests', function() { reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html', isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -763,8 +754,7 @@ describe('OC.SetupChecks tests', function() { phpSupported: {eol: true, version: '5.4.0'}, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -818,8 +808,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: false, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: ['recommendation1', 'recommendation2'], phpOpcacheDocumentation: 'https://example.org/link/to/doc', isSettimelimitAvailable: true, hasFreeTypeSupport: true, @@ -844,63 +833,7 @@ describe('OC.SetupChecks tests', function() { async.done(function( data, s, x ){ expect(data).toEqual([{ - msg: 'The PHP OPcache module is not properly configured. <a target="_blank" rel="noreferrer noopener" class="external" href="https://example.org/link/to/doc">For better performance it is recommended ↗</a> to use the following settings in the <code>php.ini</code>:' + "<pre><code>opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1</code></pre>", - type: OC.SetupChecks.MESSAGE_TYPE_INFO - }]); - done(); - }); - }); - - it('should return an info if server has no opcache at all', function(done) { - var async = OC.SetupChecks.checkSetup(); - - suite.server.requests[0].respond( - 200, - { - 'Content-Type': 'application/json' - }, - JSON.stringify({ - hasFileinfoInstalled: true, - isGetenvServerWorking: true, - isReadOnlyConfig: false, - hasWorkingFileLocking: true, - hasValidTransactionIsolationLevel: true, - suggestedOverwriteCliURL: '', - isRandomnessSecure: true, - securityDocs: 'https://docs.nextcloud.com/myDocs.html', - isFairUseOfFreePushService: true, - serverHasInternetConnectionProblems: false, - isMemcacheConfigured: true, - forwardedForHeadersWorking: true, - isCorrectMemcachedPHPModuleInstalled: true, - hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: false, - phpOpcacheDocumentation: 'https://example.org/link/to/doc', - isSettimelimitAvailable: true, - hasFreeTypeSupport: true, - missingIndexes: [], - missingPrimaryKeys: [], - missingColumns: [], - cronErrors: [], - cronInfo: { - diffInSeconds: 0 - }, - isMemoryLimitSufficient: true, - appDirsWithDifferentOwner: [], - recommendedPHPModules: [], - pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false, - isDefaultPhoneRegionSet: true, - isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true, - reverseProxyGeneratedURL: 'https://server', - temporaryDirectoryWritable: true, - }) - ); - - async.done(function( data, s, x ){ - expect(data).toEqual([{ - msg: 'The PHP OPcache module is not loaded. <a target="_blank" rel="noreferrer noopener" class="external" href="https://example.org/link/to/doc">For better performance it is recommended ↗</a> to load it into your PHP installation.', + msg: 'The PHP OPcache module is not properly configured:<ul><li>recommendation1</li><li>recommendation2</li></ul>', type: OC.SetupChecks.MESSAGE_TYPE_INFO }]); done(); @@ -930,8 +863,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], phpOpcacheDocumentation: 'https://example.org/link/to/doc', isSettimelimitAvailable: true, hasFreeTypeSupport: false, @@ -986,8 +918,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -1045,8 +976,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -1101,8 +1031,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -1154,8 +1083,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -1209,8 +1137,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], @@ -1264,8 +1191,7 @@ describe('OC.SetupChecks tests', function() { forwardedForHeadersWorking: true, isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, - isOpcacheProperlySetup: true, - hasOpcacheLoaded: true, + OpcacheSetupRecommendations: [], isSettimelimitAvailable: true, hasFreeTypeSupport: true, missingIndexes: [], |