Skip to content

Commit 3bf88ed

Browse files
committed
MQE-1715: .credentials file must exist but it should not have to
- Added try/catch logic to problem area.
1 parent c608c2c commit 3bf88ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Magento\FunctionalTestingFramework\DataGenerator\Persist\DataPersistenceHandler;
1010
use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException;
11+
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
1112

1213
class PersistedObjectHandler
1314
{
@@ -86,7 +87,12 @@ public function createEntity(
8687
}
8788

8889
foreach ($overrideFields as $index => $field) {
89-
$overrideFields[$index] = CredentialStore::getInstance()->decryptAllSecretsInString($field);
90+
try {
91+
$overrideFields[$index] = CredentialStore::getInstance()->decryptAllSecretsInString($field);
92+
} catch (TestFrameworkException $e) {
93+
//do not rethrow if Credentials are not defined
94+
$overrideFields[$index] = $field;
95+
}
9096
}
9197

9298
$retrievedEntity = DataObjectHandler::getInstance()->getObject($entity);

0 commit comments

Comments
 (0)