Skip to content

Commit

Permalink
test: update out-of-date binary versions
Browse files Browse the repository at this point in the history
that dont match the globalSetup values and actually start a binary
  • Loading branch information
hasezoey committed Aug 3, 2024
1 parent c089f17 commit 8a989a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ describe('MongoMemoryReplSet', () => {
describe('server version specific', () => {
// should use default options that are supported for 7.0 (like not using "ephemeralForTest" by default)
it('should allow mongodb by default 7.0', async () => {
const server = await MongoMemoryReplSet.create({ binary: { version: '7.0.7' } });
const server = await MongoMemoryReplSet.create({ binary: { version: '7.0.11' } });

await server.stop();
});
Expand All @@ -746,7 +746,7 @@ describe('MongoMemoryReplSet', () => {
it('should not warn if no explicit storage engine is set in 7.0', async () => {
jest.spyOn(console, 'warn');
const server = await MongoMemoryReplSet.create({
binary: { version: '7.0.7' },
binary: { version: '7.0.11' },
// replSet: { storageEngine: 'ephemeralForTest' },
});

Expand All @@ -760,7 +760,7 @@ describe('MongoMemoryReplSet', () => {
it('should warn if "ephemeralForTest" is used explicitly in mongodb 7.0', async () => {
const spy = jest.spyOn(console, 'warn').mockImplementationOnce(() => {});
const server = await MongoMemoryReplSet.create({
binary: { version: '7.0.7' },
binary: { version: '7.0.11' },
replSet: { storageEngine: 'ephemeralForTest' },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ describe('MongoMemoryServer', () => {
describe('server version specific', () => {
// should use default options that are supported for 7.0 (like not using "ephemeralForTest" by default)
it('should allow mongodb by default 7.0', async () => {
const server = await MongoMemoryServer.create({ binary: { version: '7.0.7' } });
const server = await MongoMemoryServer.create({ binary: { version: '7.0.11' } });

await server.stop();
});
Expand All @@ -1266,7 +1266,7 @@ describe('MongoMemoryServer', () => {
it('should not warn if no explicit storage engine is set in 7.0', async () => {
jest.spyOn(console, 'warn');
const server = await MongoMemoryServer.create({
binary: { version: '7.0.7' },
binary: { version: '7.0.11' },
// instance: { storageEngine: 'ephemeralForTest' },
});

Expand All @@ -1280,7 +1280,7 @@ describe('MongoMemoryServer', () => {
it('should warn if "ephemeralForTest" is used explicitly in mongodb 7.0', async () => {
const spy = jest.spyOn(console, 'warn').mockImplementationOnce(() => {});
const server = await MongoMemoryServer.create({
binary: { version: '7.0.7' },
binary: { version: '7.0.11' },
instance: { storageEngine: 'ephemeralForTest' },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ describe('MongodbInstance', () => {
const mongod = await MongodbInstance.create({
// this works without problems, because no explicit storage-engine is given, so mongodb automatically chooses wiredTiger
instance: { port: gotPort, dbPath: tmpDir },
binary: { version: '7.0.0' },
binary: { version: '7.0.11' },
});
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
await mongod.stop();
Expand Down

0 comments on commit 8a989a3

Please sign in to comment.