From 6b48c69af69623b9b5f680334694d1a48ffd4ccd Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 6 May 2023 12:54:34 +0530 Subject: [PATCH] test: config reorder Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/tests/db/timezone.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/playwright/tests/db/timezone.spec.ts b/tests/playwright/tests/db/timezone.spec.ts index d58c3a2434..7440b33254 100644 --- a/tests/playwright/tests/db/timezone.spec.ts +++ b/tests/playwright/tests/db/timezone.spec.ts @@ -345,13 +345,14 @@ test.describe('Timezone', () => { async function createTableWithDateTimeColumn(database: string) { if (database === 'pg') { const config = getKnexConfig({ dbName: 'postgres', dbType: 'pg' }); - const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'pg' }); const pgknex = knex(config); await pgknex.raw(`DROP DATABASE IF EXISTS datetimetable`); await pgknex.raw(`CREATE DATABASE datetimetable`); await pgknex.destroy(); + const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'pg' }); + const pgknex2 = knex(config2); await pgknex2.raw(` CREATE TABLE my_table ( @@ -369,13 +370,14 @@ async function createTableWithDateTimeColumn(database: string) { await pgknex2.destroy(); } else if (database === 'mysql') { const config = getKnexConfig({ dbName: 'sakila', dbType: 'mysql' }); - const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'mysql' }); const mysqlknex = knex(config); await mysqlknex.raw(`DROP DATABASE IF EXISTS datetimetable`); await mysqlknex.raw(`CREATE DATABASE datetimetable`); await mysqlknex.destroy(); + const config2 = getKnexConfig({ dbName: 'datetimetable', dbType: 'mysql' }); + const mysqlknex2 = knex(config2); await mysqlknex2.raw(` USE datetimetable;