diff options
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 78 |
1 files changed, 67 insertions, 11 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index e22fb35102e..bde1f6d6a79 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -170,7 +170,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -217,7 +218,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -265,7 +267,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -311,7 +314,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -355,7 +359,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -399,7 +404,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -443,7 +449,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -456,6 +463,51 @@ describe('OC.SetupChecks tests', function() { }); }); + it('should return a warning if the memory limit is too small', 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: '', + isUrandomAvailable: true, + serverHasInternetConnection: true, + isMemcacheConfigured: true, + forwardedForHeadersWorking: true, + reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html', + isCorrectMemcachedPHPModuleInstalled: true, + hasPassedCodeIntegrityCheck: true, + isOpcacheProperlySetup: true, + hasOpcacheLoaded: true, + isSettimelimitAvailable: true, + hasFreeTypeSupport: true, + missingIndexes: [], + outdatedCaches: [], + cronErrors: [], + cronInfo: { + diffInSeconds: 0 + }, + isTheMemoryLimitHighEnough: false + }) + ); + + async.done(function( data, s, x ){ + expect(data).toEqual([{ + msg: 'The PHP memory limit is below the recommended value of 512MB.', + type: OC.SetupChecks.MESSAGE_TYPE_WARNING + }]); + done(); + }); + }); + it('should return an error if the response has no statuscode 200', function(done) { var async = OC.SetupChecks.checkSetup(); @@ -508,7 +560,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -553,7 +606,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -598,7 +652,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); @@ -643,7 +698,8 @@ describe('OC.SetupChecks tests', function() { cronErrors: [], cronInfo: { diffInSeconds: 0 - } + }, + isTheMemoryLimitHighEnough: true }) ); |