File tree Expand file tree Collapse file tree 4 files changed +48
-3
lines changed
Test/Functional/Acceptance Expand file tree Collapse file tree 4 files changed +48
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function execute()
38
38
$ error = sprintf (
39
39
'The command "%s" failed. %s ' ,
40
40
$ process ->getCommandLine (),
41
- trim ($ process ->getErrorOutput (), "\n" )
41
+ trim ($ process ->getErrorOutput () ?: $ process -> getOutput () , "\n" )
42
42
);
43
43
44
44
throw new ProcessException ($ error , $ process ->getExitCode ());
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \MagentoCloud \Step \PostDeploy ;
9
9
10
+ use GuzzleHttp \Promise \PromiseInterface ;
10
11
use GuzzleHttp \RequestOptions ;
11
12
use Magento \MagentoCloud \Config \Stage \PostDeployInterface ;
12
13
use Magento \MagentoCloud \Http \PoolFactory ;
@@ -82,7 +83,9 @@ public function execute()
82
83
'concurrency ' => 1 ,
83
84
]);
84
85
85
- $ pool ->promise ()->wait ();
86
+ /** @var PromiseInterface $promise */
87
+ $ promise = $ pool ->promise ();
88
+ $ promise ->wait ();
86
89
} catch (\Throwable $ exception ) {
87
90
throw new StepException ($ exception ->getMessage (), $ exception ->getCode (), $ exception );
88
91
}
Original file line number Diff line number Diff line change 8
8
namespace Magento \MagentoCloud \Step \PostDeploy ;
9
9
10
10
use GuzzleHttp \Exception \RequestException ;
11
+ use GuzzleHttp \Promise \PromiseInterface ;
11
12
use Magento \MagentoCloud \Http \PoolFactory ;
12
13
use Magento \MagentoCloud \WarmUp \Urls ;
13
14
use Magento \MagentoCloud \Step \StepException ;
@@ -85,7 +86,9 @@ public function execute()
85
86
try {
86
87
$ pool = $ this ->poolFactory ->create ($ urls , compact ('fulfilled ' , 'rejected ' ));
87
88
88
- $ pool ->promise ()->wait ();
89
+ /** @var PromiseInterface $promise */
90
+ $ promise = $ pool ->promise ();
91
+ $ promise ->wait ();
89
92
} catch (\Throwable $ exception ) {
90
93
throw new StepException ($ exception ->getMessage (), $ exception ->getCode (), $ exception );
91
94
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \MagentoCloud \Test \Functional \Acceptance ;
9
+
10
+ use CliTester ;
11
+ use Magento \MagentoCloud \Test \Functional \Codeception \Docker ;
12
+
13
+ /**
14
+ * This test runs on the latest version of PHP
15
+ */
16
+ class ErrorMessageCest extends AbstractCest
17
+ {
18
+ /**
19
+ * @param CliTester $I
20
+ * @throws \Robo\Exception\TaskException
21
+ */
22
+ public function _before (CliTester $ I )
23
+ {
24
+ parent ::_before ($ I );
25
+ $ I ->cloneTemplate ();
26
+ $ I ->addEceComposerRepo ();
27
+ }
28
+
29
+ /**
30
+ * @param CliTester $I
31
+ * @throws \Robo\Exception\TaskException
32
+ */
33
+ public function testShellErrorMessage (CliTester $ I )
34
+ {
35
+ $ I ->cleanDirectories (['/bin/* ' ]);
36
+ $ I ->assertFalse ($ I ->runEceToolsCommand ('build ' , Docker::BUILD_CONTAINER ));
37
+ $ I ->seeInOutput ('Could not open input file: ./bin/magento ' );
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments