Skip to content

Commit

Permalink
Cleanup duplicate behat docker compose config
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Nov 4, 2024
1 parent 0b8ed37 commit 677ac3f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 63 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/stepup-behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-behat.yml
DOCKER_COMPOSE: docker compose -f docker-compose.yml
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -30,13 +30,13 @@ jobs:
- name: Install composer dependencies on the Behat container
run: |
cd stepup
${DOCKER_COMPOSE} exec -T behat bash -lc "composer install --ignore-platform-reqs -n"
${DOCKER_COMPOSE} exec behat composer install --ignore-platform-reqs -n
- name: Sleep for 10 seconds
run: sleep 10s
- name: Run Behat tests
run: |
cd stepup
docker exec -t stepup-behat-1 bash -lc "./behat"
${DOCKER_COMPOSE} exec behat ./vendor/bin/behat --config config/behat.yml
- name: Output logs on failure
if: failure()
run: |
Expand Down
12 changes: 0 additions & 12 deletions stepup/docker-compose-behat.yml

This file was deleted.

42 changes: 0 additions & 42 deletions stepup/docs/functional-testing.md

This file was deleted.

1 change: 0 additions & 1 deletion stepup/start-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ else
fi

if [ "${STEPUP_VERSION}" == "test" ]; then
extra_compose_args="-f docker-compose-behat.yml"
MODE="test"
echo -e "${GREEN}Starting in test mode${ENDCOLOR}"
else
Expand Down
10 changes: 5 additions & 5 deletions stepup/tests/behat/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ public static function setupDatabase(BeforeFeatureScope $scope)
{
// Generate test databases
echo "Preparing test schemas\n";
shell_exec("docker exec -it stepup-middleware-1 bin/console doctrine:schema:drop --env=smoketest --force");
shell_exec("docker exec -it stepup-gateway-1 bin/console doctrine:schema:drop --env=smoketest --force");
shell_exec("docker exec -it stepup-middleware-1 bin/console doctrine:schema:create --env=smoketest");
shell_exec("docker exec -it stepup-gateway-1 bin/console doctrine:schema:create --env=smoketest");
shell_exec("docker exec -t stepup-middleware-1 bin/console doctrine:schema:drop --env=smoketest --force");
shell_exec("docker exec -t stepup-gateway-1 bin/console doctrine:schema:drop --env=smoketest --force");
shell_exec("docker exec -t stepup-middleware-1 bin/console doctrine:schema:create --env=smoketest");
shell_exec("docker exec -t stepup-gateway-1 bin/console doctrine:schema:create --env=smoketest");

echo "Replaying event stream\n";
// Import the events.sql into middleware
shell_exec("mysql -uroot -psecret middleware_test -h mariadb < ./fixtures/events.sql");
shell_exec("./fixtures/middleware-push-config.sh");
// Perform an event replay
shell_exec("docker exec -ti stepup-middleware-1 bin/console middleware:event:replay --env=smoketest_event_replay --no-interaction -q");
shell_exec("docker exec -t stepup-middleware-1 bin/console middleware:event:replay --env=smoketest_event_replay --no-interaction -q");
}

/**
Expand Down

0 comments on commit 677ac3f

Please sign in to comment.