Respect KNEX_TEST, support omitting sqlite3 from DB, and reduce outside mssql test db config #4313
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.
This PR contains several changes that simplify getting a green test run in a fresh checkout by eliminating some unexpected behavior around KNEX_TEST and DB config.
Before, if DB omitted sqlite3, several of the CLI tests would fail, because only some of them conditionally skipped when sqlite3 config was not available. Now, all of those tests skip when sqlite3 tests are not selected.
Before, some of the DB integration tests did not use the config supplied in KNEX_TEST. Now, all run by test:db do.
Before, the mssql transaction isolation tests required, not just a test DB, but also a test DB with snapshot isolation already enabled. This led to test failures due to having a test DB without that config already set up. Now, that test suite ensures snapshot isolation is enabled upfront before running its tests.
There is no documentation PR; the main intent of this PR is to align test suite behavior with the existing documentation around how the DB and KNEX_TEST environment variables affect test running.