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()
181181 * Get vault token helper script by parsing lines in vault config file
182182 *
183183 * @param array $lines
184- * @return array
184+ * @return string
185185 */
186186 private function getTokenHelperScript ($ lines )
187187 {
@@ -200,14 +200,16 @@ private function getTokenHelperScript($lines)
200200 *
201201 * @param string $cmd
202202 * @return string
203+ * @throws TestFrameworkException
203204 */
204205 private function execVaultTokenHelper ($ cmd )
205206 {
206- $ output = '' ;
207207 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 ];
210210 }
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+ );
212214 }
213215}
You can’t perform that action at this time.
0 commit comments