setting to skip migration tests by default

* if you install owncloud via package it is not
  possible to skip migration tests
* this also allows to disable migration tests for
  an instance by default
This commit is contained in:
Morris Jobke 2015-10-01 14:23:25 +02:00
parent 77942ad38a
commit 2e444e6e37
3 changed files with 21 additions and 0 deletions

View File

@ -1195,6 +1195,15 @@ $CONFIG = array(
*/
'debug' => false,
/**
* Skips the migration test during upgrades
*
* If this is set to true the migration test are deactivated during upgrade.
* This is only recommended in installations where upgrade tests are run in
* advance with the same data on a test system.
*/
'update.skip-migration-test' => false,
/**
* This entry is just here to show a warning in case somebody copied the sample
* configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION!

View File

@ -50,6 +50,12 @@ if (OC::checkUpgrade(false)) {
\OC::$server->getIntegrityCodeChecker(),
$logger
);
if ($config->getSystemValue('update.skip-migration-test', false)) {
$eventSource->send('success', (string)$l->t('Migration tests are skipped - "update.skip-migration-test" is activated in config.php'));
$updater->setSimulateStepEnabled(false);
}
$incompatibleApps = [];
$disabledThirdPartyApps = [];

View File

@ -99,6 +99,12 @@ class Upgrade extends Command {
$updateStepEnabled = true;
$skip3rdPartyAppsDisable = false;
if ($this->config->getSystemValue('update.skip-migration-test', false)) {
$output->writeln(
'<info>"skip-migration-test" is activated via config.php</info>'
);
$simulateStepEnabled = false;
}
if ($input->getOption('skip-migration-test')) {
$simulateStepEnabled = false;
}