Skip to content

Commit

Permalink
feat(fulfillment): implementation part 2 (#6408)
Browse files Browse the repository at this point in the history
**What**

> [!NOTE]  
> I can see this pr becoming huge, so I d like to get this partial one merged 👍 


- Fixes shared connection usage (mikro orm compare the instance to its own package and therefore was resulting in not trully reusing the provided connection leading to exhausting the connection pool as multiple connections was created and end up not being all destroyed properly under the hood, discovered in my integration tests)
- Create shipping options method implementation
- DTO's definition and service interface update
- integration tests 
- Re work of the indexes with new util update
- Test runner utils to remove a big chunk of the boilerplate of the packages integrations

FIXES CORE-1742
  • Loading branch information
adrien2p authored Feb 19, 2024
1 parent 680dfcd commit 1d91b74
Show file tree
Hide file tree
Showing 59 changed files with 2,209 additions and 1,737 deletions.
8 changes: 8 additions & 0 deletions .changeset/real-teachers-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@medusajs/medusa": patch
"medusa-test-utils": patch
"@medusajs/product": patch
"@medusajs/types": patch
---

feat(fulfillment): implementation part 2
12 changes: 6 additions & 6 deletions packages/auth/integration-tests/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { TestDatabaseUtils } from "medusa-test-utils"
const pathToMigrations = "../../src/migrations"
const mikroOrmEntities = AuthModels as unknown as any[]

export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper(
export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig(
export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const DB_URL = TestDatabaseUtils.getDatabaseURL()
12 changes: 6 additions & 6 deletions packages/cart/integration-tests/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import * as CartModels from "@models"
const pathToMigrations = "../../src/migrations"
const mikroOrmEntities = CartModels as unknown as any[]

export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper(
export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig(
export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const DB_URL = TestDatabaseUtils.getDatabaseURL()
12 changes: 6 additions & 6 deletions packages/customer/integration-tests/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import * as Models from "@models"
const pathToMigrations = "../../src/migrations"
const mikroOrmEntities = Models as unknown as any[]

export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper(
export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig(
export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig({
mikroOrmEntities,
pathToMigrations
)
pathToMigrations,
})

export const DB_URL = TestDatabaseUtils.getDatabaseURL()

This file was deleted.

Loading

0 comments on commit 1d91b74

Please sign in to comment.