Skip to content

Commit 0f29273

Browse files
committed
Fix bin/console commands in tests
1 parent 776b0cc commit 0f29273

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stepup/tests/behat/features/bootstrap/FeatureContext.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ public static function execCommand(string $command): void
5353

5454
if($result === false) {
5555
echo "Failed executing command\n";
56-
die();
56+
exit(1);
5757
}
5858

5959
foreach ($output as $line) {
6060
echo $line."\n";
6161
}
6262

6363
if ($returnCode !== 0) {
64-
die();
64+
exit($returnCode);
6565
}
6666
}
6767

@@ -76,20 +76,20 @@ public static function setupDatabase(BeforeSuiteScope $scope)
7676

7777
// Generate test databases
7878
echo "Preparing test schemas for Middleware\n";
79-
self::execCommand('docker exec -t stepup-middleware-1 bin/console doctrine:schema:drop --em=middleware --env=smoketest --force');
80-
self::execCommand('docker exec -t stepup-middleware-1 bin/console doctrine:schema:create --em=middleware --env=smoketest');
79+
self::execCommand('docker exec -t stepup-middleware-1 php bin/console doctrine:schema:drop --em=middleware --env=smoketest --force');
80+
self::execCommand('docker exec -t stepup-middleware-1 php bin/console doctrine:schema:create --em=middleware --env=smoketest');
8181

8282
echo "Preparing test schemas for Gateway\n";
83-
self::execCommand('docker exec -t stepup-middleware-1 bin/console doctrine:schema:drop --em=gateway --env=smoketest --force');
84-
self::execCommand('docker exec -t stepup-middleware-1 bin/console doctrine:schema:create --em=gateway --env=smoketest');
83+
self::execCommand('docker exec -t stepup-middleware-1 php bin/console doctrine:schema:drop --em=gateway --env=smoketest --force');
84+
self::execCommand('docker exec -t stepup-middleware-1 php bin/console doctrine:schema:create --em=gateway --env=smoketest');
8585

8686
// Import the events.sql into middleware
8787
echo "Add events to test database\n";
8888
self::execCommand("mysql -uroot -psecret middleware_test -h mariadb < ./fixtures/events.sql");
8989

9090
// Perform an event replay
9191
echo "Replaying event stream\n";
92-
self::execCommand("docker exec -t stepup-middleware-1 bin/console middleware:event:replay --env=smoketest_event_replay --no-interaction -vvv");
92+
self::execCommand("docker exec -t stepup-middleware-1 php bin/console middleware:event:replay --env=smoketest_event_replay --no-interaction -vvv");
9393

9494
// Push config
9595
echo "Push Middleware config\n";

0 commit comments

Comments
 (0)