chore(integration-tests): Add test for database options (#2707)
**What** - Add integration test suite for database options - Expose integration tests DB to additional options - Add test for `idle_in_transaction_session_timeout`
This commit is contained in:
@@ -78,7 +78,7 @@ const DbTestUtil = {
|
||||
const instance = DbTestUtil
|
||||
|
||||
module.exports = {
|
||||
initDb: async function ({ cwd }) {
|
||||
initDb: async function ({ cwd, database_extra }) {
|
||||
const configPath = path.resolve(path.join(cwd, `medusa-config.js`))
|
||||
const { projectConfig, featureFlags } = require(configPath)
|
||||
|
||||
@@ -98,6 +98,7 @@ module.exports = {
|
||||
database: projectConfig.database_database,
|
||||
synchronize: true,
|
||||
entities,
|
||||
extra: database_extra ?? {},
|
||||
})
|
||||
|
||||
instance.setDb(dbConnection)
|
||||
@@ -137,6 +138,7 @@ module.exports = {
|
||||
url: DB_URL,
|
||||
entities: enabledEntities,
|
||||
migrations: enabledMigrations,
|
||||
extra: database_extra ?? {},
|
||||
name: "integration-tests",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user