From a244eddf45125c16d8446827295d4a0b0f92e2b0 Mon Sep 17 00:00:00 2001 From: Nicolas MURE Date: Fri, 7 Sep 2018 13:35:39 +0200 Subject: [PATCH] fix opencloud tests --- .../Functional/Adapter/OpenCloudTest.php | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/Gaufrette/Functional/Adapter/OpenCloudTest.php b/tests/Gaufrette/Functional/Adapter/OpenCloudTest.php index 322ebed0b..ae459e4b6 100644 --- a/tests/Gaufrette/Functional/Adapter/OpenCloudTest.php +++ b/tests/Gaufrette/Functional/Adapter/OpenCloudTest.php @@ -24,10 +24,22 @@ public function setUp() $this->markTestSkipped('Either RACKSPACE_USER, RACKSPACE_APIKEY and/or RACKSPACE_CONTAINER env vars are missing.'); } - $connection = new Rackspace('https://identity.api.rackspacecloud.com/v2.0/', [ - 'username' => $username, - 'apiKey' => $apiKey, - ]); + $connection = new Rackspace( + 'https://identity.api.rackspacecloud.com/v2.0/', + [ + 'username' => $username, + 'apiKey' => $apiKey, + ], + [ + // Guzzle ships with outdated certs + // @see https://github.com/rackspace/php-opencloud/issues/727 + Rackspace::SSL_CERT_AUTHORITY => 'system', + Rackspace::CURL_OPTIONS => [ + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + ], + ] + ); $this->container = uniqid($container); $this->objectStore = $connection->objectStoreService('cloudFiles', 'IAD', 'publicURL');