ci: fix tests and code style

This commit is contained in:
odain
2026-04-08 12:43:09 +02:00
parent 83ff3b1629
commit b86226ef7f
4 changed files with 7 additions and 4 deletions

View File

@@ -648,7 +648,8 @@ class RunTimeEnvironment
}
}
public function SetDbUUID() : void {
public function SetDbUUID(): void
{
// Set a DBProperty with a unique ID to identify this instance of iTop
$sUUID = DBProperty::GetProperty('database_uuid', '');
if ($sUUID === '') {

View File

@@ -134,11 +134,11 @@ class ApplicationInstallSequencer extends StepSequencer
$aSelectedExtensionCodes,
$sInstallComment
);
$this->oRunTimeEnvironment->ExitReadOnlyMode();
return $this->ComputeNextStep($sStep);
case 'commit':
$this->oRunTimeEnvironment->Commit();
$this->oRunTimeEnvironment->ExitReadOnlyMode();
return $this->GetNextStep('', 'Completed', 100);
default:

View File

@@ -35,7 +35,7 @@ class DataAuditSequencer extends StepSequencer
{
try {
$fStart = microtime(true);
/**
* @since 3.2.0 move the ContextTag init at the very beginning of the method
* @noinspection PhpUnusedLocalVariableInspection

View File

@@ -306,7 +306,6 @@ class ApplicationInstallerSequencerTest extends ItopTestCase
$this->GivenApplicationInstallSequencer($aAdditionalParams);
$this->oRunTimeEnvironment->expects($this->once())->method('DoCreateConfig')
->with($this->oConfig, "6.6.6", ["a" => "b"], ["c" => "d"], null);
$this->oRunTimeEnvironment->expects($this->once())->method('ExitReadOnlyMode');
$aRes = $this->oSequencer->ExecuteStep('create-config');
$aExpected = [
@@ -322,6 +321,9 @@ class ApplicationInstallerSequencerTest extends ItopTestCase
public function testCommit()
{
$this->GivenApplicationInstallSequencer();
$this->oRunTimeEnvironment->expects($this->once())->method('Commit');
$this->oRunTimeEnvironment->expects($this->once())->method('ExitReadOnlyMode');
$aRes = $this->oSequencer->ExecuteStep('commit');
$aExpected = [
'message' => '',