aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-10-24 14:19:23 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-11-13 15:55:46 +0100
commit749523603403f11c2958a51fb64a7035d9f4eb73 (patch)
tree26f2e5677adc74682e4911a1aee11efc8bdd2b3d /core
parenteaaf954753bf86ce581a0cdc06987b41312cdded (diff)
downloadnextcloud-server-749523603403f11c2958a51fb64a7035d9f4eb73.tar.gz
nextcloud-server-749523603403f11c2958a51fb64a7035d9f4eb73.zip
Migrate memory_limit check to new SetupCheck API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/setupchecks.js6
-rw-r--r--core/js/tests/specs/setupchecksSpec.js31
2 files changed, 12 insertions, 25 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index f5ac8575365..2c487e10997 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -355,12 +355,6 @@
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
})
}
- if (!data.isMemoryLimitSufficient) {
- messages.push({
- msg: t('core', 'The PHP memory limit is below the recommended value of 512MB.'),
- type: OC.SetupChecks.MESSAGE_TYPE_ERROR
- })
- }
if(data.appDirsWithDifferentOwner && data.appDirsWithDifferentOwner.length > 0) {
var appDirsWithDifferentOwner = data.appDirsWithDifferentOwner.reduce(
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 246574653a9..88c455974bd 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -237,7 +237,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -292,7 +291,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -347,7 +345,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -402,7 +399,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -455,7 +451,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [
'/some/path'
],
@@ -511,7 +506,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -567,7 +561,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -621,7 +614,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -675,7 +667,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: false,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -692,6 +683,18 @@ describe('OC.SetupChecks tests', function() {
linkToDoc: null
}
},
+ php: {
+ "Internet connectivity": {
+ severity: "success",
+ description: null,
+ linkToDoc: null
+ },
+ "PHP memory limit": {
+ severity: "error",
+ description: "The PHP memory limit is below the recommended value of 512MB.",
+ linkToDoc: null
+ },
+ },
},
})
);
@@ -748,7 +751,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -808,7 +810,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -861,7 +862,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -918,7 +918,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -972,7 +971,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -1023,7 +1021,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -1077,7 +1074,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: false,
areWebauthnExtensionsEnabled: true,
@@ -1131,7 +1127,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: false,
@@ -1184,7 +1179,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,
@@ -1244,7 +1238,6 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true,
appDirsWithDifferentOwner: [],
isImagickEnabled: true,
areWebauthnExtensionsEnabled: true,