Skip to content

Commit

Permalink
Solve pending migrations error by disabling schema maintenance (#68)
Browse files Browse the repository at this point in the history
* Solve pending migrations error by disabling schema maintenance

* Remove blank line

---------

Co-authored-by: Nils Rauch <[email protected]>
  • Loading branch information
Vakmeth and TheWalkingLeek authored Sep 2, 2024
1 parent 7411e0f commit be368d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/hit/test/env
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ if [[ "$HIT_TEST_ENV" == "core" ]]; then
PREPARE_RAILS_SPEC_CMD="rake db:migrate"
WORKDIR=/usr/src/app/hitobito
else
apply_core_db_migrations
PREPARE_RAILS_SPEC_CMD="cp ../hitobito/Gemfile.lock . && rake app:wagon:migrate"
WORKDIR="/usr/src/app/hitobito_$HIT_TEST_ENV"
apply_core_db_migrations
fi

# run test env
Expand All @@ -81,6 +81,7 @@ docker compose run --rm \
-e RAILS_ENV=test \
-e RAILS_TEST_DB_NAME=$TEST_DB_NAME \
-e RAILS_DB_NAME=$TEST_DB_NAME \
-e DISABLE_TEST_SCHEMA_MAINTENANCE=1 \ # Do not maintain schema for testing purposes
-e SKIP_INIT=1 \
rails_test \
bundle exec "$PREPARE_RAILS_SPEC_CMD && bash"

0 comments on commit be368d5

Please sign in to comment.