Issue #3311200 by yash.rode, tedbow, Wim Leers, David Strauss, phenaproxima,...
Issue #3311200 by yash.rode, tedbow, Wim Leers, David Strauss, phenaproxima, TravisCarden: Cron updater should delete the existing stage if not available and the site is currently on an insecure version
'Cron will not perform any updates as an existing staged update is applying. The site is currently on an insecure version of Drupal core but will attempt to update to a secure version next time cron is run. This update may be applied manually at the <a href="%url">update form</a>.',
// @todo Improve this in https://www.drupal.org/i/3325654.
$this->logger->notice('The existing stage was not in the process of being applied, so it was destroyed to allow updating the site to a secure version during cron.');
$this->assertTrue($this->logger->hasRecord('The existing stage was not in the process of being applied, so it was destroyed to allow updating the site to a secure version during cron.',(string)RfcLogLevel::NOTICE));
}
/**
* Tests stage is not destroyed if another update is applying.
$this->assertTrue($this->logger->hasRecord("Cron will not perform any updates as an existing staged update is applying. The site is currently on an insecure version of Drupal core but will attempt to update to a secure version next time cron is run. This update may be applied manually at the <a href=\"%url\">update form</a>.",(string)RfcLogLevel::NOTICE));
$this->assertUpdateStagedTimes(1);
}
/**
* Tests stage is not destroyed if not available and site is on secure version.
// Trigger CronUpdater, the above should cause it to detect a stage that is
// applying.
$this->container->get('cron')->run();
$this->assertTrue($this->logger->hasRecord('Cron will not perform any updates because there is an existing stage and the current version of the site is secure.',(string)RfcLogLevel::NOTICE));
$this->assertUpdateStagedTimes(1);
}
/**
/**
* Tests that CronUpdater::begin() unconditionally throws an exception.
* Tests that CronUpdater::begin() unconditionally throws an exception.