summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-11-16 17:05:24 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-01-15 13:29:40 +0100
commit265f6dc1367915a19e195c035ef0e5e87f7308de (patch)
tree6a7c850cfca380e8dcab5113f52cdc56e0c6e447 /core
parentca63726a89a35438a1241a463aac220241851d30 (diff)
downloadnextcloud-server-265f6dc1367915a19e195c035ef0e5e87f7308de.tar.gz
nextcloud-server-265f6dc1367915a19e195c035ef0e5e87f7308de.zip
Migrate opcache 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.js12
-rw-r--r--core/js/tests/specs/setupchecksSpec.js63
2 files changed, 0 insertions, 75 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index e7ad920760e..e85f32dae4a 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -240,18 +240,6 @@
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
});
}
- if(data.OpcacheSetupRecommendations.length > 0) {
- var listOfOPcacheRecommendations = "";
- data.OpcacheSetupRecommendations.forEach(function(element){
- listOfOPcacheRecommendations += '<li>' + element + '</li>';
- });
- messages.push({
- msg: t('core', 'The PHP OPcache module is not properly configured. See the {linkstart}documentation ↗{linkend} for more information.')
- .replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="' + OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-php-opcache') + '">')
- .replace('{linkend}', '</a>') + '<ul>' + listOfOPcacheRecommendations + '</ul>',
- type: OC.SetupChecks.MESSAGE_TYPE_INFO
- });
- }
if(!data.isSettimelimitAvailable) {
messages.push({
msg: t('core', 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.'),
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 5184b3e8c0d..bb7d118fc52 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -227,7 +227,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -276,7 +275,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -325,7 +323,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -374,7 +371,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: false,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -421,7 +417,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -471,7 +466,6 @@ describe('OC.SetupChecks tests', function() {
reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: false,
cronErrors: [],
cronInfo: {
@@ -519,7 +513,6 @@ describe('OC.SetupChecks tests', function() {
reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -598,7 +591,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -639,53 +631,6 @@ describe('OC.SetupChecks tests', function() {
});
});
- it('should return an info if server has no proper opcache', function(done) {
- var async = OC.SetupChecks.checkSetup();
-
- suite.server.requests[0].respond(
- 200,
- {
- 'Content-Type': 'application/json'
- },
- JSON.stringify({
- suggestedOverwriteCliURL: '',
- isFairUseOfFreePushService: true,
- isCorrectMemcachedPHPModuleInstalled: true,
- hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: ['recommendation1', 'recommendation2'],
- isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
- appDirsWithDifferentOwner: [],
- isImagickEnabled: true,
- areWebauthnExtensionsEnabled: true,
- isMysqlUsedWithoutUTF8MB4: false,
- isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
- reverseProxyGeneratedURL: 'https://server',
- temporaryDirectoryWritable: true,
- generic: {
- network: {
- "Internet connectivity": {
- severity: "success",
- description: null,
- linkToDoc: null
- }
- },
- },
- })
- );
-
- async.done(function( data, s, x ){
- expect(data).toEqual([{
- msg: 'The PHP OPcache module is not properly configured. See the <a target="_blank" rel="noreferrer noopener" class="external" href="https://docs.example.org/admin-php-opcache">documentation ↗</a> for more information.<ul><li>recommendation1</li><li>recommendation2</li></ul>',
- type: OC.SetupChecks.MESSAGE_TYPE_INFO
- }]);
- done();
- });
- });
-
it('should return an error if the php version is no longer supported', function(done) {
var async = OC.SetupChecks.checkSetup();
@@ -699,7 +644,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -750,7 +694,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -798,7 +741,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -843,7 +785,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -891,7 +832,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -939,7 +879,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -986,7 +925,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {
@@ -1040,7 +978,6 @@ describe('OC.SetupChecks tests', function() {
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
- OpcacheSetupRecommendations: [],
isSettimelimitAvailable: true,
cronErrors: [],
cronInfo: {