diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-08 13:36:11 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-03-08 13:38:39 +0100 |
commit | 060b637b70ed44ac09e400a435ca066c514ef09a (patch) | |
tree | 6240481ae2dd87c555c97d19b9c3340c5d56c5e3 /core/js/tests | |
parent | 49c7799496344ad1b5efa5295dad60c8595f4bf2 (diff) | |
download | nextcloud-server-060b637b70ed44ac09e400a435ca066c514ef09a.tar.gz nextcloud-server-060b637b70ed44ac09e400a435ca066c514ef09a.zip |
Show a setup warning in case S3 object storage is used as primary storage
* checks for at least 50 GB of free space
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/setupchecksSpec.js | 91 |
1 files changed, 77 insertions, 14 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index aa9006d0ab5..0603ac72281 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -248,7 +248,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -299,7 +300,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -351,7 +353,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -401,7 +404,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -449,7 +453,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -499,7 +504,8 @@ describe('OC.SetupChecks tests', function() { ], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -547,7 +553,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -595,7 +602,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -643,7 +651,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -712,7 +721,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -761,7 +771,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -810,7 +821,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -859,7 +871,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: false + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -907,7 +920,8 @@ describe('OC.SetupChecks tests', function() { appDirsWithDifferentOwner: [], recommendedPHPModules: [], pendingBigIntConversionColumns: [], - isMysqlUsedWithoutUTF8MB4: true + isMysqlUsedWithoutUTF8MB4: true, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true }) ); @@ -919,6 +933,55 @@ describe('OC.SetupChecks tests', function() { done(); }); }); + + it('should return an error if there is not enough free space in the temp directory', 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.owncloud.org/myDocs.html', + serverHasInternetConnection: true, + isMemcacheConfigured: true, + forwardedForHeadersWorking: true, + isCorrectMemcachedPHPModuleInstalled: true, + hasPassedCodeIntegrityCheck: true, + isOpcacheProperlySetup: true, + hasOpcacheLoaded: true, + isSettimelimitAvailable: true, + hasFreeTypeSupport: true, + missingIndexes: [], + cronErrors: [], + cronInfo: { + diffInSeconds: 0 + }, + isMemoryLimitSufficient: true, + appDirsWithDifferentOwner: [], + recommendedPHPModules: [], + pendingBigIntConversionColumns: [], + isMysqlUsedWithoutUTF8MB4: false, + isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: false + }) + ); + + async.done(function( data, s, x ){ + expect(data).toEqual([{ + msg: 'This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.', + type: OC.SetupChecks.MESSAGE_TYPE_WARNING + }]); + done(); + }); + }); }); describe('checkGeneric', function() { |