chore(integration-tests): Normalize DB config + use single process (#2077)
This commit is contained in:
committed by
GitHub
parent
687a6badeb
commit
690ca9e89a
@@ -2233,7 +2233,6 @@ describe("/admin/discounts", () => {
|
||||
})
|
||||
|
||||
const cond = discountCondition.data.discount_condition
|
||||
console.log(cond.products)
|
||||
|
||||
expect(discountCondition.status).toEqual(200)
|
||||
expect(cond).toMatchSnapshot({
|
||||
|
||||
@@ -101,10 +101,6 @@ describe("Line Item Adjustments", () => {
|
||||
await doAfterEach()
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await doAfterEach()
|
||||
})
|
||||
|
||||
describe("Given an existing line item, a discount, and a line item adjustment for both", () => {
|
||||
describe("When creating an adjustment for another line item w. same discount", () => {
|
||||
test("Then should create an adjustment", async () => {
|
||||
|
||||
@@ -17,6 +17,7 @@ module.exports = {
|
||||
],
|
||||
transformIgnorePatterns: [`/dist`],
|
||||
transform: { "^.+\\.[jt]s$": `../../jest-transformer.js` },
|
||||
setupFiles: ["../setup-env.js"],
|
||||
setupFilesAfterEnv: ["../setup.js"],
|
||||
globalSetup: "../globalSetup.js",
|
||||
globalTeardown: "../globalTeardown.js",
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
const DB_USERNAME = process.env.DB_USERNAME || "postgres"
|
||||
const DB_PASSWORD = process.env.DB_PASSWORD || ""
|
||||
const workerId = parseInt(process.env.JEST_WORKER_ID || "1")
|
||||
const DB_HOST = process.env.DB_HOST
|
||||
const DB_USERNAME = process.env.DB_USERNAME
|
||||
const DB_PASSWORD = process.env.DB_PASSWORD
|
||||
const DB_NAME = process.env.DB_TEMP_NAME
|
||||
|
||||
module.exports = {
|
||||
plugins: [],
|
||||
projectConfig: {
|
||||
redis_url: process.env.REDIS_URL,
|
||||
database_url: `postgres://${DB_USERNAME}:${DB_PASSWORD}@localhost/medusa-integration-${workerId}`,
|
||||
database_url: `postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}`,
|
||||
database_type: "postgres",
|
||||
jwt_secret: "test",
|
||||
cookie_secret: "test",
|
||||
|
||||
Reference in New Issue
Block a user