N°9144 - no audit in unattended + tests

This commit is contained in:
odain
2026-05-06 10:46:57 +02:00
parent 73ebf663d6
commit 4d2722654a
5 changed files with 80 additions and 10 deletions

View File

@@ -1331,6 +1331,9 @@ class RunTimeEnvironment
{
$oSetupAudit = new SetupAudit(ITOP_DEFAULT_ENV, $this->sBuildEnv);
//Make sure the MetaModel is started before analysing for issues
$sConfFile = utils::GetConfigFilePath(ITOP_DEFAULT_ENV);
MetaModel::Startup($sConfFile, false, false); // Start on production environment
$oSetupAudit->RunDataAudit(true);
$iCount = $oSetupAudit->GetDataToCleanupCount();

View File

@@ -94,6 +94,10 @@ class DataAuditSequencer extends StepSequencer
protected function IsDataAuditRequired(): bool
{
if (! array_key_exists('setup-audit', $this->oParams->Get('optional_steps', []))) {
return false;
}
if ('install' === $this->oParams->Get('mode')) {
return false;
}

View File

@@ -66,6 +66,7 @@ abstract class AbstractWizStepInstall extends WizardStep
'log-parameters' => true,
'migrate-before' => true,
'migrate-after' => true,
'setup-audit' => true,
// 'backup' => see below
],
'source_dir' => str_replace(APPROOT, '', $sSourceDir),