File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/Magento/FunctionalTestingFramework/DataGenerator/Handlers Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \FunctionalTestingFramework \DataGenerator \Handlers ;
8
8
9
+ use Magento \FunctionalTestingFramework \Config \MftfApplicationConfig ;
9
10
use Magento \FunctionalTestingFramework \Console \BuildProjectCommand ;
10
11
use Magento \FunctionalTestingFramework \Exceptions \TestFrameworkException ;
11
12
use Magento \FunctionalTestingFramework \Util \Logger \LoggingUtil ;
@@ -53,15 +54,23 @@ private function __construct()
53
54
*
54
55
* @param string $key
55
56
* @return string|null
57
+ * @throws TestFrameworkException
56
58
*/
57
59
public function getSecret ($ key )
58
60
{
59
61
if (!array_key_exists ($ key , $ this ->credentials )) {
60
- LoggingUtil:: getInstance ()-> getLogger (CredentialStore::class)-> error (
62
+ throw new TestFrameworkException (
61
63
"{$ key } not defined in .credentials, please provide a value in order to use this secret in a test. "
62
64
);
63
65
}
64
66
67
+ // log here for verbose config
68
+ if (MftfApplicationConfig::getConfig ()->verboseEnabled ()) {
69
+ LoggingUtil::getInstance ()->getLogger (CredentialStore::class)->debug (
70
+ "retrieving secret for key name {$ key }"
71
+ );
72
+ }
73
+
65
74
return $ this ->credentials [$ key ] ?? null ;
66
75
}
67
76
You can’t perform that action at this time.
0 commit comments