N°7407 - N°7306 - Ease iTop installation via unattended CLI by using installation.xml choices (#641)

* N°7306 - Use iTop configuration settings to run unattended installation (instead of XML file settings)

* 7306 - fix infinite loop with db_tls.ca null

* 7306 - complete fields to use from itop configuration instead of XML setup

* fix using default language from conf

* 6365 - temp work

* 6365 - add option to select modules from installation.xml

* 6365-select modules option in unattended install

* 6365 - pass env to service + debug failed test

* 6365 - debug ci again + separate process annotation

* 6365 - fix test + cleanup

* 6365 - ci using use_installation_xml mode

* 6365 - ci using use_installation_xml mode

* 6365 - pass selected_modules to unattended

* N°6365 - Compute selected modules based on selected extensions coming from XML setup

* switch constr parameters and fix call from unattended cli

* 6365 - use use_installation_xml for unattended install only when no selected modules already provided

* test ci XML setup including selected extensions but no modules

* test ci installing iTop without selected modules/extenesions: guess via installation.xml

* same but without even providing XML setup - comment it in ci_description.ini

* 7306 - cleanup requires

* use infra master

* N°6365 - make current unattended CLI work with any iTop version (CLIPage compatibility)

* N°6365 - log which modules will be installed during setup

* N°6365 - unattended documentation + bash helper

* 6365- fix warning due to copies index access

* 6365 - enhance traces feedback to understant which and how modules are computes

* 6365 - enhance bash CLI + doc

* 6365 - fix require clipage compatibility

* 6365 - add return for better cli ouput

* 6365 - enhance ouput messages

* Document the usage and harmonize argument names (still not perfect)

* 6365 - fix use of new param param-file

* 6365 - fix test + vardump cleanup

* N°6365 - use underscore for unattended install options as advices in the PR

* 6365 -enhance test by using PHP_BINARY

---------

Co-authored-by: Romain Quetiez <romain.quetiez@combodo.com>
This commit is contained in:
odain-cbd
2024-04-09 09:35:44 +02:00
committed by odain
parent 5a34c76cc4
commit 85c576a986
15 changed files with 1092 additions and 207 deletions

View File

@@ -63,9 +63,12 @@ class UnattendedInstallTest extends ItopDataTestCase
}
public function testCallUnattendedInstallFromCLI() {
$cliPath = realpath(APPROOT."/setup/unattended-install/unattended-install.php");
$res = exec("php ".$cliPath);
$sCliPath = realpath(APPROOT."/setup/unattended-install/unattended-install.php");
exec(sprintf("%s %s", PHP_BINARY . " ".$sCliPath), $aOutput, $iCode);
$this->assertEquals("Param file `default-params.xml` doesn't exist ! Exiting...", $res);
$sOutput = implode('\n', $aOutput);
var_dump($sOutput);
$this->assertStringContainsString("Missing mandatory argument `--param-file`", $sOutput);
$this->assertEquals(255, $iCode);
}
}