Skip to content

Commit

Permalink
Merge pull request #438 from magento/MQE-1715
Browse files Browse the repository at this point in the history
MQE-1715: .credentials file must exist but it should not have to
  • Loading branch information
okolesnyk authored Aug 30, 2019
2 parents c608c2c + 9015ee9 commit d9de524
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Magento Functional Testing Framework Changelog
================================================

2.4.5
-----
### Fixes
* Fixed an issue where `.credentials` was required when using `<createData>` actions with field overrides.

2.4.4
-----
### Fixes
Expand Down
2 changes: 1 addition & 1 deletion bin/mftf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
try {
$application = new Symfony\Component\Console\Application();
$application->setName('Magento Functional Testing Framework CLI');
$application->setVersion('2.4.4');
$application->setVersion('2.4.5');
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
foreach ($commandList->getCommands() as $command) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "2.4.4",
"version": "2.4.5",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Magento\FunctionalTestingFramework\DataGenerator\Persist\DataPersistenceHandler;
use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException;
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;

class PersistedObjectHandler
{
Expand Down Expand Up @@ -86,7 +87,12 @@ public function createEntity(
}

foreach ($overrideFields as $index => $field) {
$overrideFields[$index] = CredentialStore::getInstance()->decryptAllSecretsInString($field);
try {
$overrideFields[$index] = CredentialStore::getInstance()->decryptAllSecretsInString($field);
} catch (TestFrameworkException $e) {
//do not rethrow if Credentials are not defined
$overrideFields[$index] = $field;
}
}

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

0 comments on commit d9de524

Please sign in to comment.