|
@@ -246,12 +246,17 @@ describe('Application life cycle test', function () {
|
|
|
it('can login', login.bind(null, username, password));
|
|
|
|
|
|
it('runs cron jobs', function (done) {
|
|
|
- var logs = execSync('cloudron logs --lines 1000 --app ' + app.id).toString('utf8');
|
|
|
- if (logs.indexOf('Executed the cron event \'wp_version_check\'') !== -1) return done();
|
|
|
+ this.timeout(120000);
|
|
|
|
|
|
- console.log(logs);
|
|
|
+ // cron jobs are only executed when app is running and healthy
|
|
|
+ setTimeout(function () {
|
|
|
+ var logs = execSync('cloudron logs --lines 1000 --app ' + app.id).toString('utf8');
|
|
|
+ if (logs.indexOf('Executed the cron event \'wp_version_check\'') !== -1) return done();
|
|
|
|
|
|
- done(new Error('cron jobs are possibly not running'));
|
|
|
+ console.log(logs);
|
|
|
+
|
|
|
+ done(new Error('cron jobs are possibly not running'));
|
|
|
+ }, 45000);
|
|
|
});
|
|
|
|
|
|
it('move to different location', function () {
|