mirror of
https://github.com/Combodo/iTop.git
synced 2026-09-29 21:09:10 +02:00
Compare commits
1 Commits
develop
...
issue/6073
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6fcd63f3f |
@@ -1313,8 +1313,8 @@ class utils
|
||||
}
|
||||
|
||||
if (is_null($sAuthUser)) {
|
||||
$sAuthUser = self::ReadParam('auth_user', '', 'raw_data');
|
||||
$sAuthPwd = self::ReadParam('auth_pwd', '', 'raw_data');
|
||||
$sAuthUser = self::ReadParam('auth_user', '', true, 'raw_data');
|
||||
$sAuthPwd = self::ReadParam('auth_pwd', '', true, 'raw_data');
|
||||
}
|
||||
$sParamFile = self::GetParamSourceFile('auth_user');
|
||||
if (is_null($sParamFile)) {
|
||||
|
||||
@@ -116,7 +116,7 @@ class DataSynchroTest extends ItopDataTestCase
|
||||
* @throws \MySQLException
|
||||
* @throws \OQLException
|
||||
*/
|
||||
public function RunDataSynchroTest($aUserLoginUsecase)
|
||||
public function RunDataSynchroTest($aUserLoginUsecase, array $aAdditionalImportParams = [])
|
||||
{
|
||||
$sDescription = $aUserLoginUsecase['desc'];
|
||||
$sTargetClass = $aUserLoginUsecase['target_class'];
|
||||
@@ -273,13 +273,13 @@ class DataSynchroTest extends ItopDataTestCase
|
||||
$sCSVTmpFile = tempnam(sys_get_temp_dir(), "CSV");
|
||||
file_put_contents($sCSVTmpFile, $sCsvData);
|
||||
|
||||
$aParams = [
|
||||
$aParams = array_merge($aAdditionalImportParams, [
|
||||
'csvfile' => $sCSVTmpFile,
|
||||
'data_source_id' => $iDataSourceId,
|
||||
'separator' => ';',
|
||||
'simulate' => 0,
|
||||
'output' => 'details',
|
||||
];
|
||||
]);
|
||||
list($iRetCode, $aOutputLines) = static::ExecSynchroImport($aParams, $bSynchroByHttp);
|
||||
|
||||
unlink($sCSVTmpFile);
|
||||
@@ -390,6 +390,11 @@ class DataSynchroTest extends ItopDataTestCase
|
||||
$this->RunDataSynchroTest($this->GetNominalUsecaseData());
|
||||
}
|
||||
|
||||
public function testDataSynchroByCliWithMaxChunkSize()
|
||||
{
|
||||
$this->RunDataSynchroTest($this->GetNominalUsecaseData(), ['max_chunk_size' => 1 ]);
|
||||
}
|
||||
|
||||
public function testDataSynchroByHttp()
|
||||
{
|
||||
$aUserLoginUsecase = $this->GetNominalUsecaseData();
|
||||
|
||||
Reference in New Issue
Block a user