💚 Fix unit test not working on server with self-signed certificate

This commit is contained in:
Molkobain
2023-12-07 11:18:51 +01:00
parent 75732faf1d
commit 8cc1970931

View File

@@ -178,6 +178,9 @@ class QueryTest extends ItopDataTestCase
curl_setopt($curl, CURLOPT_USERPWD, self::USER . ':' . self::PASSWORD);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Force disable of certificate check as most of dev / test env have a self-signed certificate
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
// execute curl
$result = curl_exec($curl);