fix: isolate integration test databases to prevent parallel teardown conflicts

Each integration test file now uses its own MongoDB database:
- ttl_expiration → adam-acs-ttl-test
- device_model   → adam-acs-devices-test
- base_model     → adam-acs-basemodel-test

Prevents dropDatabase() in one afterAll from destroying data
used by another test file running concurrently.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
This commit is contained in:
Kevin L'HereecandContinue committed 2026-06-08 13:27:16 +00:00
1 parent b3142a8272
commit ef30c2159c
3 files changed
+6 -6

No files matched your search

@@ -1,7 +1,7 @@
import { describe, it, expect, beforeAll, afterAll, beforeEach } from 'vitest'
import { MongoClient, Db, ObjectId } from 'mongodb'
const MONGO_URI = 'mongodb://adam:adam@localhost:27017/adam-acs-test?authSource=admin'
const MONGO_URI = 'mongodb://adam:adam@localhost:27017/adam-acs-basemodel-test?authSource=admin'
let client: MongoClient
let db: Db
@@ -20,7 +20,7 @@ describe('BaseModel (integration)', () => {
beforeAll(async () => {
client = new MongoClient(MONGO_URI)
await client.connect()
db = client.db('adam-acs-test')
db = client.db('adam-acs-basemodel-test')
// Patch getMongoDb for BaseModel
const mod = await import('../../../providers/mongodb_provider.js')