File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/SecretStorage Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ private function readVaultTokenFromFileSystem()
181
181
* Get vault token helper script by parsing lines in vault config file
182
182
*
183
183
* @param array $lines
184
- * @return array
184
+ * @return string
185
185
*/
186
186
private function getTokenHelperScript ($ lines )
187
187
{
@@ -200,14 +200,16 @@ private function getTokenHelperScript($lines)
200
200
*
201
201
* @param string $cmd
202
202
* @return string
203
+ * @throws TestFrameworkException
203
204
*/
204
205
private function execVaultTokenHelper ($ cmd )
205
206
{
206
- $ output = '' ;
207
207
exec ($ cmd , $ out , $ status );
208
- if ($ status === 0 && isset ($ out [0 ])) {
209
- $ output = $ out [0 ];
208
+ if ($ status === 0 && isset ($ out [0 ]) && ! empty ( $ out [ 0 ]) ) {
209
+ return $ out [0 ];
210
210
}
211
- return $ output ;
211
+ throw new TestFrameworkException (
212
+ 'Error running custom vault token helper script. Please make sure vault CLI works in your environment. '
213
+ );
212
214
}
213
215
}
You can’t perform that action at this time.
0 commit comments