Support alternate rails environment names for tests #665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Switches to using
db:purge
overdb:test:purge
.db:purge
:db:test:purge
hardcodes loading configuration for an environment named test.db:purge
will load the environment for whateverRAILS_ENV
is set to (or fallback).Here within parallel_tests
purge_before_load
is used on lines that support passing through alternate env's (RAILS_ENV=#{ParallelTests::Tasks.rails_env}
).Usecase
I'm trying to run parallel_tests in it's own rails environment i'm naming
parallel_test
-- this is so I can specify a few custom environment options directly for parallel runs and so i can run one of tests against a separate environment (and db config) while my parallel test suite is running.This should be backwards compatible while expanding flexibility.
Other
Wasn't sure how you are handling versioning so did a patch level bump.