Skip to content

Commit 7ec4ef7

Browse files
committed
MQE-1600: MQE-1600: MFTF Vault integration
- prefer credentials from local file over vault - address review comments
1 parent c3f67ea commit 7ec4ef7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/CredentialStore.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ public function getSecret($key)
108108
}
109109

110110
throw new TestFrameworkException(
111-
"{$key} not defined in vault or .credentials file, "
112-
. "please provide a value in order to use this secret in a test.\"."
111+
"\"{$key}\" not defined in vault or .credentials file, "
112+
. "please provide a value in order to use this secret in a test."
113113
);
114114
}
115115

@@ -140,7 +140,7 @@ public function decryptAllSecretsInString($string)
140140
// Loop through storage to decrypt all occurrences from input string
141141
foreach (self::$credStoragePrecedence as $credType) {
142142
if (null !== $this->credStorage[$credType]) {
143-
return $this->credStorage[$credType]->getAllDecryptedValues($string);
143+
return $this->credStorage[$credType]->getAllDecryptedValuesInString($string);
144144
}
145145
}
146146
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function getDecryptedValue($value)
7373
* @param string $string
7474
* @return mixed
7575
*/
76-
public function getAllDecryptedValues($string)
76+
public function getAllDecryptedValuesInString($string)
7777
{
7878
$newString = $string;
7979
foreach (self::$cachedSecretData as $key => $secretValue) {

0 commit comments

Comments
 (0)