Skip to content

Commit d9de524

Browse files
authored
Merge pull request #438 from magento/MQE-1715
MQE-1715: .credentials file must exist but it should not have to
2 parents c608c2c + 9015ee9 commit d9de524

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
2.4.5
5+
-----
6+
### Fixes
7+
* Fixed an issue where `.credentials` was required when using `<createData>` actions with field overrides.
8+
49
2.4.4
510
-----
611
### Fixes

bin/mftf

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ try {
2929
try {
3030
$application = new Symfony\Component\Console\Application();
3131
$application->setName('Magento Functional Testing Framework CLI');
32-
$application->setVersion('2.4.4');
32+
$application->setVersion('2.4.5');
3333
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
3434
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
3535
foreach ($commandList->getCommands() as $command) {

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "2.4.4",
5+
"version": "2.4.5",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {

composer.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)