mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) repair a migration test when running against postgres
Summary: This is fixing some fall-out from some environmental changes after another batch of tests were moved to grist-core. Test Plan: this is fixing a test, no app changes Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4156
This commit is contained in:
parent
2a206dfcf8
commit
15a73fdaf0
@ -79,6 +79,13 @@ describe('migrations', function() {
|
|||||||
|
|
||||||
beforeEach(async function() {
|
beforeEach(async function() {
|
||||||
await home.connect();
|
await home.connect();
|
||||||
|
// If testing against postgres, remove all tables.
|
||||||
|
// If SQLite, we're using a fresh in-memory db each time.
|
||||||
|
const sqlite = home.connection.driver.options.type === 'sqlite';
|
||||||
|
if (!sqlite) {
|
||||||
|
await home.connection.query('DROP SCHEMA public CASCADE');
|
||||||
|
await home.connection.query('CREATE SCHEMA public');
|
||||||
|
}
|
||||||
await createInitialDb(home.connection, false);
|
await createInitialDb(home.connection, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user