Skip to content

Commit 2a3bd28

Browse files
authored
Merge pull request #117 from magento-commerce/imported-magento-magento2-functional-testing-framework-870
[Imported] Removing the `csharpru/vault-php-guzzle6-transport` not needed dependency
2 parents 9279c62 + c93b2d5 commit 2a3bd28

File tree

3 files changed

+55
-60
lines changed

3 files changed

+55
-60
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"codeception/module-webdriver": "^1.0",
2424
"composer/composer": "^1.9||^2.0",
2525
"csharpru/vault-php": "^4.2.1",
26-
"csharpru/vault-php-guzzle6-transport": "^2.0",
26+
"guzzlehttp/guzzle": "^7.3.0",
2727
"hoa/console": "~3.0",
2828
"monolog/monolog": "^2.3",
2929
"mustache/mustache": "~2.5",

composer.lock

Lines changed: 45 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/SecretStorage/VaultStorage.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
namespace Magento\FunctionalTestingFramework\DataGenerator\Handlers\SecretStorage;
88

9+
use GuzzleHttp\Client as GuzzleClient;
910
use Magento\FunctionalTestingFramework\Config\MftfApplicationConfig;
1011
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
1112
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
1213
use Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil;
1314
use Vault\Client;
14-
use VaultTransports\Guzzle6Transport;
1515

1616
class VaultStorage extends BaseStorage
1717
{
@@ -78,8 +78,14 @@ public function __construct($baseUrl, $secretBasePath)
7878
{
7979
parent::__construct();
8080
if (null === $this->client) {
81-
// Creating the client using Guzzle6 Transport and passing a custom url
82-
$this->client = new Client(new Guzzle6Transport(['base_uri' => $baseUrl]));
81+
// client configuration and override http errors settings
82+
$config = [
83+
'timeout' => 15,
84+
'base_uri' => $baseUrl,
85+
'http_errors' => false
86+
];
87+
88+
$this->client = new Client(new GuzzleClient($config));
8389
$this->secretBasePath = $secretBasePath;
8490
}
8591
$this->readVaultTokenFromFileSystem();

0 commit comments

Comments
 (0)