Browse Source

test: config reorder

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5602/head
Raju Udava 2 years ago
parent
commit
6b48c69af6
  1. 6
      tests/playwright/tests/db/timezone.spec.ts

6
tests/playwright/tests/db/timezone.spec.ts

@ -345,13 +345,14 @@ test.describe('Timezone', () => {
async function createTableWithDateTimeColumn(database: string) { async function createTableWithDateTimeColumn(database: string) {
if (database === 'pg') { if (database === 'pg') {
const config = getKnexConfig({ dbName: 'postgres', dbType: 'pg' }); const config = getKnexConfig({ dbName: 'postgres', dbType: 'pg' });
const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'pg' });
const pgknex = knex(config); const pgknex = knex(config);
await pgknex.raw(`DROP DATABASE IF EXISTS datetimetable`); await pgknex.raw(`DROP DATABASE IF EXISTS datetimetable`);
await pgknex.raw(`CREATE DATABASE datetimetable`); await pgknex.raw(`CREATE DATABASE datetimetable`);
await pgknex.destroy(); await pgknex.destroy();
const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'pg' });
const pgknex2 = knex(config2); const pgknex2 = knex(config2);
await pgknex2.raw(` await pgknex2.raw(`
CREATE TABLE my_table ( CREATE TABLE my_table (
@ -369,13 +370,14 @@ async function createTableWithDateTimeColumn(database: string) {
await pgknex2.destroy(); await pgknex2.destroy();
} else if (database === 'mysql') { } else if (database === 'mysql') {
const config = getKnexConfig({ dbName: 'sakila', dbType: 'mysql' }); const config = getKnexConfig({ dbName: 'sakila', dbType: 'mysql' });
const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'mysql' });
const mysqlknex = knex(config); const mysqlknex = knex(config);
await mysqlknex.raw(`DROP DATABASE IF EXISTS datetimetable`); await mysqlknex.raw(`DROP DATABASE IF EXISTS datetimetable`);
await mysqlknex.raw(`CREATE DATABASE datetimetable`); await mysqlknex.raw(`CREATE DATABASE datetimetable`);
await mysqlknex.destroy(); await mysqlknex.destroy();
const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'mysql' });
const mysqlknex2 = knex(config2); const mysqlknex2 = knex(config2);
await mysqlknex2.raw(` await mysqlknex2.raw(`
USE datetimetable; USE datetimetable;

Loading…
Cancel
Save