N°4459 Make sure that every test will pass even if the CI provides an invalid configuration file. Also allow encryption mecanism to be fully controlled by the tests

This commit is contained in:
Romain Quetiez
2024-05-18 17:49:07 +02:00
parent 8823068608
commit 1de179f683
3 changed files with 11 additions and 49 deletions

View File

@@ -129,6 +129,13 @@ abstract class ItopDataTestCase extends ItopTestCase
{
$this->CreateTestOrganization();
}
$oConfig = MetaModel::GetConfig();
if ($oConfig->GetEncryptionLibrary() != DEFAULT_ENCRYPTION_LIB
&& $oConfig->GetEncryptionKey() == DEFAULT_ENCRYPTION_KEY) {
// Config file is corrupted, let's fix it
$oConfig->SetEncryptionKey("6eb9d9afa3ee0fbcebe622a33bf57aaeafb7c37998fd24c403c2522c2d60117f");
}
}
/**