Issue #647964 by jergason, bfroehle, Damien Tournoud, corbacho, Pancho: Fixed Running cron does not check for available updates.
parent
ba9bcb2c7c
commit
4fd8e38f46
|
@ -293,6 +293,7 @@ function update_cron() {
|
||||||
// the cached data for all projects, attempt to re-fetch, and trigger any
|
// the cached data for all projects, attempt to re-fetch, and trigger any
|
||||||
// configured notifications about the new status.
|
// configured notifications about the new status.
|
||||||
update_refresh();
|
update_refresh();
|
||||||
|
update_fetch_data();
|
||||||
_update_cron_notify();
|
_update_cron_notify();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -133,6 +133,19 @@ class UpdateCoreTestCase extends UpdateTestHelper {
|
||||||
$this->assertNoText(t('Security update required!'));
|
$this->assertNoText(t('Security update required!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check that running cron updates the list of available updates.
|
||||||
|
*/
|
||||||
|
function testModulePageRunCron() {
|
||||||
|
$this->setSystemInfo7_0();
|
||||||
|
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
||||||
|
variable_set('update_test_xml_map', array('drupal' => '0'));
|
||||||
|
|
||||||
|
$this->cronRun();
|
||||||
|
$this->drupalGet('admin/modules');
|
||||||
|
$this->assertNoText(t('No update information available.'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the messages at admin/modules when the site is up to date.
|
* Check the messages at admin/modules when the site is up to date.
|
||||||
*/
|
*/
|
||||||
|
@ -142,10 +155,10 @@ class UpdateCoreTestCase extends UpdateTestHelper {
|
||||||
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
||||||
variable_set('update_test_xml_map', array('drupal' => '0'));
|
variable_set('update_test_xml_map', array('drupal' => '0'));
|
||||||
|
|
||||||
$this->drupalGet('admin/modules');
|
$this->drupalGet('admin/reports/updates');
|
||||||
$this->assertText(t('No update information available.'));
|
$this->clickLink(t('Check manually'));
|
||||||
$this->clickLink(t('check manually'));
|
|
||||||
$this->assertText(t('Checked available update data for one project.'));
|
$this->assertText(t('Checked available update data for one project.'));
|
||||||
|
$this->drupalGet('admin/modules');
|
||||||
$this->assertNoText(t('There are updates available for your version of Drupal.'));
|
$this->assertNoText(t('There are updates available for your version of Drupal.'));
|
||||||
$this->assertNoText(t('There is a security update available for your version of Drupal.'));
|
$this->assertNoText(t('There is a security update available for your version of Drupal.'));
|
||||||
}
|
}
|
||||||
|
@ -159,10 +172,10 @@ class UpdateCoreTestCase extends UpdateTestHelper {
|
||||||
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
||||||
variable_set('update_test_xml_map', array('drupal' => '1'));
|
variable_set('update_test_xml_map', array('drupal' => '1'));
|
||||||
|
|
||||||
$this->drupalGet('admin/modules');
|
$this->drupalGet('admin/reports/updates');
|
||||||
$this->assertText(t('No update information available.'));
|
$this->clickLink(t('Check manually'));
|
||||||
$this->clickLink(t('check manually'));
|
|
||||||
$this->assertText(t('Checked available update data for one project.'));
|
$this->assertText(t('Checked available update data for one project.'));
|
||||||
|
$this->drupalGet('admin/modules');
|
||||||
$this->assertText(t('There are updates available for your version of Drupal.'));
|
$this->assertText(t('There are updates available for your version of Drupal.'));
|
||||||
$this->assertNoText(t('There is a security update available for your version of Drupal.'));
|
$this->assertNoText(t('There is a security update available for your version of Drupal.'));
|
||||||
}
|
}
|
||||||
|
@ -176,10 +189,10 @@ class UpdateCoreTestCase extends UpdateTestHelper {
|
||||||
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
|
||||||
variable_set('update_test_xml_map', array('drupal' => '2-sec'));
|
variable_set('update_test_xml_map', array('drupal' => '2-sec'));
|
||||||
|
|
||||||
$this->drupalGet('admin/modules');
|
$this->drupalGet('admin/reports/updates');
|
||||||
$this->assertText(t('No update information available.'));
|
$this->clickLink(t('Check manually'));
|
||||||
$this->clickLink(t('check manually'));
|
|
||||||
$this->assertText(t('Checked available update data for one project.'));
|
$this->assertText(t('Checked available update data for one project.'));
|
||||||
|
$this->drupalGet('admin/modules');
|
||||||
$this->assertNoText(t('There are updates available for your version of Drupal.'));
|
$this->assertNoText(t('There are updates available for your version of Drupal.'));
|
||||||
$this->assertText(t('There is a security update available for your version of Drupal.'));
|
$this->assertText(t('There is a security update available for your version of Drupal.'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue