-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parameterize schema in which migration tests run via `PGROLL_TEST_SCH…
…EMA` env var (#276) Parameterize the migration tests so that the schema in which migrations are applied is taken from the `PGROLL_TEST_SCHEMA` environment variable, or `public` if unset. #273 highlights an area in which there is a lack of test coverage: migration tests apply migrations only in the `public` schema. #273 is an error that is only reproducible when running migrations in a non-`public` schema and there are currently also other problems with migration validation in non-`public` schema. This PR makes repetitive changes to all tests: * Update the `afterStart`, `afterComplete` and `afterRollback` hooks to take a `schema string` parameter. * Update all hard-coded occurences of `"public"` in those hooks with the `schema` parameter. Later PRs will fix the issues with running migrations in non-`public` schema and run non-`public` migration tests in CI. For now, to run migration tests in a non-`public` schema run: ``` PGROLL_TEST_SCHEMA=foo go test ./... ``` Part of #273
- Loading branch information
1 parent
a5cf473
commit c95bc78
Showing
19 changed files
with
721 additions
and
705 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.