mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-20 23:13:35 +00:00
⚙️ fix: Guard Mongo Cleanup In Package Service Tests (#17992)
* fix: Guard Mongo Cleanup In Package Services Tests * fix: Guard Mongo Cleanup In Agents Precedence And Promotion Tests
This commit is contained in:
parent
368e376cee
commit
fbca86bba9
28 changed files with 28 additions and 28 deletions
|
|
@ -227,7 +227,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
}, LIFECYCLE_TIMEOUT_MS);
|
||||
|
||||
describe('hiding librechat.yaml custom endpoints by key', () => {
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ afterEach(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongod.stop();
|
||||
await mongod?.stop();
|
||||
}, DB_SETUP_TIMEOUT_MS);
|
||||
|
||||
describe('completion wake-ups and queued user turns at run end', () => {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ afterEach(async () => {
|
|||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
describe('KeyvMongo key index', () => {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ describe('code environment registry', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ describe('resolveSubagentCodeWorkspaceInheritance', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ describe('staged browser setup registry', () => {
|
|||
});
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
test('explicitly enforces owner-slot uniqueness when automatic index creation is disabled', async () => {
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ describe('browser setup HTTP protocol boundary', () => {
|
|||
else process.env[name] = value;
|
||||
}
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
function app(options: { registrationUnavailable?: boolean } = {}) {
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ describe('browser setup durable lifecycle', () => {
|
|||
});
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
test('resumes immutable starts, returns the CLI approval, and idempotently completes the final owner slot', async () => {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ describe('subagent code targets against the principal-scoped machine list', () =
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ describe('getPluginAuthMap with mixed-version records', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
it('decrypts legacy and v3 records stored for the same plugin', async () => {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongod.stop();
|
||||
await mongod?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ describe('checkBalance', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
for (const modelName of modelsToCleanup) {
|
||||
if (mongoose.models[modelName]) {
|
||||
delete mongoose.models[modelName];
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -2850,7 +2850,7 @@ describe('scheduled reset policy synchronization', () => {
|
|||
});
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
beforeEach(async () => {
|
||||
await mongoose.connection.dropDatabase();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongoServer.stop();
|
||||
await mongoServer?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ describe('Skill cleanup across a worker restart', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
it('finishes a superseded committed upload without reporting successful cleanup as a lost claim', async () => {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ beforeAll(async () => {
|
|||
});
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await server.stop();
|
||||
await server?.stop();
|
||||
if (originalStrict == null) delete process.env.TENANT_ISOLATION_STRICT;
|
||||
else process.env.TENANT_ISOLATION_STRICT = originalStrict;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3812,7 +3812,7 @@ describe('steady-state sync of an unchanged source', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await server.stop();
|
||||
await server?.stop();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ beforeAll(async () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await mongoose.disconnect();
|
||||
await mongo.stop();
|
||||
await mongo?.stop();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue