Skip to content

Commit da142df

Browse files
committed
MC-5926: Conflict of simultaneous write in Redis cache
- add integration test bin magento to EE
1 parent da92f5c commit da142df

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

dev/tests/integration/bin/magento

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
8+
if (PHP_SAPI !== 'cli') {
9+
echo 'bin/magento must be run as a CLI application';
10+
exit(1);
11+
}
12+
13+
if (isset($_SERVER['INTEGRATION_TEST_PARAMS'])) {
14+
parse_str($_SERVER['INTEGRATION_TEST_PARAMS'], $params);
15+
foreach ($params as $paramName => $paramValue) {
16+
$_SERVER[$paramName] = $paramValue;
17+
}
18+
} else {
19+
echo 'Test parameters are required';
20+
exit(1);
21+
}
22+
23+
try {
24+
require $_SERVER['MAGE_DIRS']['base']['path'] . '/app/bootstrap.php';
25+
} catch (\Exception $e) {
26+
echo 'Autoload error: ' . $e->getMessage();
27+
exit(1);
28+
}
29+
try {
30+
$handler = new \Magento\Framework\App\ErrorHandler();
31+
set_error_handler([$handler, 'handler']);
32+
$application = new Magento\Framework\Console\Cli('Magento CLI');
33+
$application->run();
34+
} catch (\Exception $e) {
35+
while ($e) {
36+
echo $e->getMessage();
37+
echo $e->getTraceAsString();
38+
echo "\n\n";
39+
$e = $e->getPrevious();
40+
}
41+
exit(Cli::RETURN_FAILURE);
42+
}

0 commit comments

Comments
 (0)