From 87dd003a6db0f4995e4f50742d1b6d8d4d99cb22 Mon Sep 17 00:00:00 2001 From: Benjamin DALSASS Date: Tue, 14 Apr 2026 08:54:54 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B08638=20-=20Adapt=20mysqldump=20calls=20t?= =?UTF-8?q?o=20follow=20iTop=20SSL=20configuration=20-=20fix=20unitary=20t?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/backup.class.inc.php | 2 +- tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/setup/backup.class.inc.php b/setup/backup.class.inc.php index c02c27ef61..142cd630f8 100644 --- a/setup/backup.class.inc.php +++ b/setup/backup.class.inc.php @@ -511,7 +511,7 @@ EOF; { $bDbTlsEnabled = $oConfig->Get('db_tls.enabled'); if (!$bDbTlsEnabled) { - return CMDBSource::IsSslModeDBVersion() ? ' --skip-ssl' : ''; + return CMDBSource::IsSslModeDBVersion() ? ' --skip-ssl' : ''; } $sTlsOptions = ''; // Mysql 5.7.11 and upper deprecated --ssl and uses --ssl-mode instead diff --git a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php index 37a582df10..bad982ce1a 100644 --- a/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/DBBackupTest.php @@ -45,7 +45,11 @@ class DBBackupTest extends ItopTestCase $oConfigToTest->Set('db_tls.enabled', false); $sCliArgsNoTls = DBBackup::GetMysqlCliTlsOptions($oConfigToTest); - $this->assertEmpty($sCliArgsNoTls); + if (CMDBSource::IsSslModeDBVersion()) { + $this->assertEquals(' --skip-ssl', $sCliArgsNoTls); + } else { + $this->assertEmpty($sCliArgsNoTls); + } } /**