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:
parent
64994facce
commit
7cbdd9b90b
|
@ -1140,6 +1140,15 @@ $CONFIG = array(
|
||||||
*/
|
*/
|
||||||
'debug' => false,
|
'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
|
* This entry is just here to show a warning in case somebody copied the sample
|
||||||
* configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION!
|
* configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION!
|
||||||
|
|
|
@ -41,12 +41,21 @@ if (OC::checkUpgrade(false)) {
|
||||||
// avoid side effects
|
// avoid side effects
|
||||||
\OC_User::setIncognitoMode(true);
|
\OC_User::setIncognitoMode(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$logger = \OC::$server->getLogger();
|
$logger = \OC::$server->getLogger();
|
||||||
|
$config = \OC::$server->getConfig();
|
||||||
$updater = new \OC\Updater(
|
$updater = new \OC\Updater(
|
||||||
\OC::$server->getHTTPHelper(),
|
\OC::$server->getHTTPHelper(),
|
||||||
\OC::$server->getConfig(),
|
$config,
|
||||||
$logger
|
$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 = [];
|
$incompatibleApps = [];
|
||||||
$disabledThirdPartyApps = [];
|
$disabledThirdPartyApps = [];
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,12 @@ class Upgrade extends Command {
|
||||||
$updateStepEnabled = true;
|
$updateStepEnabled = true;
|
||||||
$skip3rdPartyAppsDisable = false;
|
$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')) {
|
if ($input->getOption('skip-migration-test')) {
|
||||||
$simulateStepEnabled = false;
|
$simulateStepEnabled = false;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +125,7 @@ class Upgrade extends Command {
|
||||||
|
|
||||||
$self = $this;
|
$self = $this;
|
||||||
$updater = new Updater(\OC::$server->getHTTPHelper(),
|
$updater = new Updater(\OC::$server->getHTTPHelper(),
|
||||||
\OC::$server->getConfig());
|
$this->config);
|
||||||
|
|
||||||
$updater->setSimulateStepEnabled($simulateStepEnabled);
|
$updater->setSimulateStepEnabled($simulateStepEnabled);
|
||||||
$updater->setUpdateStepEnabled($updateStepEnabled);
|
$updater->setUpdateStepEnabled($updateStepEnabled);
|
||||||
|
|
Loading…
Reference in New Issue