mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 00:32:16 +02:00
N°9564 - enhance simulate testing script to use local settings
This commit is contained in:
@@ -15,78 +15,42 @@ $aParams = [
|
|||||||
new ContextTag(ContextTag::TAG_SETUP);
|
new ContextTag(ContextTag::TAG_SETUP);
|
||||||
$sToken = SetupUtils::CreateSetupToken();
|
$sToken = SetupUtils::CreateSetupToken();
|
||||||
|
|
||||||
$aSelectedModules = [
|
function GetLastestInstallFile(): ?string
|
||||||
'authent-cas',
|
{
|
||||||
'authent-external',
|
$aFiles = glob(APPROOT.'/log/install-*.xml');
|
||||||
'authent-ldap',
|
rsort($aFiles);
|
||||||
'authent-local',
|
$iLatestCtime = 0;
|
||||||
'combodo-backoffice-darkmoon-theme',
|
$sLastFilePath = null;
|
||||||
'combodo-backoffice-fullmoon-high-contrast-theme',
|
foreach ($aFiles as $sFilePath) {
|
||||||
'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme',
|
if (is_file($sFilePath)) {
|
||||||
'combodo-backoffice-fullmoon-tritanopia-theme',
|
$iCurrentCtime = filemtime($sFilePath);
|
||||||
'combodo-data-feature-removal',
|
if ($iCurrentCtime > $iLatestCtime) {
|
||||||
'itop-backup',
|
$iLatestCtime = $iCurrentCtime;
|
||||||
'itop-config',
|
$sLastFilePath = $sFilePath;
|
||||||
'itop-files-information',
|
}
|
||||||
'itop-portal-base',
|
}
|
||||||
'itop-profiles-itil',
|
}
|
||||||
'itop-sla-computation',
|
|
||||||
'itop-structure',
|
|
||||||
'itop-welcome-itil',
|
|
||||||
'itop-config-mgmt',
|
|
||||||
'itop-attachments',
|
|
||||||
'itop-tickets',
|
|
||||||
'combodo-db-tools',
|
|
||||||
'itop-core-update',
|
|
||||||
'itop-hub-connector',
|
|
||||||
'itop-oauth-client',
|
|
||||||
'itop-themes-compat',
|
|
||||||
'combodo-my-account',
|
|
||||||
'combodo-my-account-user-info',
|
|
||||||
'combodo-oauth2-client',
|
|
||||||
'itop-attribute-class-set',
|
|
||||||
'itop-attribute-encrypted-password',
|
|
||||||
'itop-ui-copypaste',
|
|
||||||
'itop-datacenter-mgmt',
|
|
||||||
'itop-endusers-devices',
|
|
||||||
'itop-storage-mgmt',
|
|
||||||
'itop-virtualization-mgmt',
|
|
||||||
'itop-bridge-cmdb-ticket',
|
|
||||||
'itop-bridge-virtualization-storage',
|
|
||||||
'itop-service-mgmt',
|
|
||||||
'itop-bridge-cmdb-services',
|
|
||||||
'itop-bridge-datacenter-mgmt-services',
|
|
||||||
'itop-bridge-endusers-devices-services',
|
|
||||||
'itop-bridge-storage-mgmt-services',
|
|
||||||
'itop-bridge-virtualization-mgmt-services',
|
|
||||||
'itop-request-mgmt',
|
|
||||||
'itop-portal',
|
|
||||||
'itop-change-mgmt',
|
|
||||||
'itop-faq-light',
|
|
||||||
'itop-knownerror-mgmt',
|
|
||||||
'itop-problem-mgmt',
|
|
||||||
'itop-system-information',
|
|
||||||
'itop-log-mgmt',
|
|
||||||
];
|
|
||||||
|
|
||||||
$aSelectedExtensions = [
|
return $sLastFilePath;
|
||||||
'itop-config-mgmt-core',
|
}
|
||||||
'itop-config-mgmt-datacenter',
|
|
||||||
'itop-config-mgmt-end-user',
|
|
||||||
'itop-config-mgmt-storage',
|
|
||||||
'itop-config-mgmt-virtualization',
|
|
||||||
'itop-service-mgmt-enterprise',
|
|
||||||
'itop-ticket-mgmt-simple-ticket',
|
|
||||||
'itop-ticket-mgmt-simple-ticket-enhanced-portal',
|
|
||||||
'itop-change-mgmt-simple',
|
|
||||||
'itop-kown-error-mgmt',
|
|
||||||
'itop-problem-mgmt',
|
|
||||||
'itop-system-information',
|
|
||||||
'itop-log-mgmt',
|
|
||||||
];
|
|
||||||
|
|
||||||
$aRemovedExtensions = ['itop-container-mgmt' => 'Containerization'];
|
$aRemovedExtensions = ['itop-container-mgmt' => 'Containerization'];
|
||||||
|
|
||||||
|
$sPath = GetLastestInstallFile();
|
||||||
|
if (is_null($sPath)) {
|
||||||
|
throw new Exception("$sPath no installation XM. Launch a setup....");
|
||||||
|
}
|
||||||
|
$aParams = new XMLParameters($sPath);
|
||||||
|
$aSelectedModules = array_filter($aParams->Get('selected_modules', []), static function ($element) {
|
||||||
|
global $aRemovedExtensions;
|
||||||
|
return ! array_key_exists($element, $aRemovedExtensions);
|
||||||
|
});
|
||||||
|
|
||||||
|
$aSelectedExtensions = array_filter($aParams->Get('selected_extensions', []), static function ($element) {
|
||||||
|
global $aRemovedExtensions;
|
||||||
|
return ! array_key_exists($element, $aRemovedExtensions);
|
||||||
|
});
|
||||||
|
|
||||||
$aPostParams = [
|
$aPostParams = [
|
||||||
"auth_user" => 'admin',
|
"auth_user" => 'admin',
|
||||||
"auth_pwd" => 'admin',
|
"auth_pwd" => 'admin',
|
||||||
|
|||||||
Reference in New Issue
Block a user