Fix unit tests of master
Follow up to #3802 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
57c1be8633
commit
bb2ec51bbb
|
@ -156,6 +156,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -188,6 +189,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -221,6 +223,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -252,6 +255,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -281,6 +285,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: false,
|
isCorrectMemcachedPHPModuleInstalled: false,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -310,6 +315,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -322,6 +328,36 @@ describe('OC.SetupChecks tests', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should return an error if set_time_limit is unavailable', function(done) {
|
||||||
|
var async = OC.SetupChecks.checkSetup();
|
||||||
|
|
||||||
|
suite.server.requests[0].respond(
|
||||||
|
200,
|
||||||
|
{
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
JSON.stringify({
|
||||||
|
isUrandomAvailable: true,
|
||||||
|
serverHasInternetConnection: true,
|
||||||
|
isMemcacheConfigured: true,
|
||||||
|
forwardedForHeadersWorking: true,
|
||||||
|
reverseProxyDocs: 'https://docs.owncloud.org/foo/bar.html',
|
||||||
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
|
hasPassedCodeIntegrityCheck: true,
|
||||||
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: false
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
async.done(function( data, s, x ){
|
||||||
|
expect(data).toEqual([{
|
||||||
|
msg: 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.',
|
||||||
|
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
|
||||||
|
}]);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('should return an error if the response has no statuscode 200', function(done) {
|
it('should return an error if the response has no statuscode 200', function(done) {
|
||||||
var async = OC.SetupChecks.checkSetup();
|
var async = OC.SetupChecks.checkSetup();
|
||||||
|
|
||||||
|
@ -360,6 +396,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
isCorrectMemcachedPHPModuleInstalled: true,
|
isCorrectMemcachedPHPModuleInstalled: true,
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: true,
|
isOpcacheProperlySetup: true,
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -390,6 +427,7 @@ describe('OC.SetupChecks tests', function() {
|
||||||
hasPassedCodeIntegrityCheck: true,
|
hasPassedCodeIntegrityCheck: true,
|
||||||
isOpcacheProperlySetup: false,
|
isOpcacheProperlySetup: false,
|
||||||
phpOpcacheDocumentation: 'https://example.org/link/to/doc',
|
phpOpcacheDocumentation: 'https://example.org/link/to/doc',
|
||||||
|
isSettimelimitAvailable: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,7 @@ class CheckSetupControllerTest extends TestCase {
|
||||||
'codeIntegrityCheckerDocumentation' => 'http://doc.owncloud.org/server/go.php?to=admin-code-integrity',
|
'codeIntegrityCheckerDocumentation' => 'http://doc.owncloud.org/server/go.php?to=admin-code-integrity',
|
||||||
'isOpcacheProperlySetup' => false,
|
'isOpcacheProperlySetup' => false,
|
||||||
'phpOpcacheDocumentation' => 'http://doc.owncloud.org/server/go.php?to=admin-php-opcache',
|
'phpOpcacheDocumentation' => 'http://doc.owncloud.org/server/go.php?to=admin-php-opcache',
|
||||||
|
'isSettimelimitAvailable' => true,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$this->assertEquals($expected, $this->checkSetupController->check());
|
$this->assertEquals($expected, $this->checkSetupController->check());
|
||||||
|
|
Loading…
Reference in New Issue