Skip to content

Commit e77dd56

Browse files
committed
test(MongoBinaryDownloadUrl): add tests for fedora
1 parent 8f33ef4 commit e77dd56

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,42 @@ describe('MongoBinaryDownloadUrl', () => {
302302
);
303303
});
304304
});
305+
306+
describe('for fedora', () => {
307+
it('should return a archive name for Fedora 32', async () => {
308+
const du = new MongoBinaryDownloadUrl({
309+
platform: 'linux',
310+
arch: 'x64',
311+
version: '4.0.24',
312+
os: {
313+
os: 'linux',
314+
dist: 'fedora',
315+
release: '32',
316+
},
317+
});
318+
319+
expect(await du.getDownloadUrl()).toBe(
320+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.0.24.tgz'
321+
);
322+
});
323+
324+
it('should return a archive name for Fedora 34', async () => {
325+
const du = new MongoBinaryDownloadUrl({
326+
platform: 'linux',
327+
arch: 'x64',
328+
version: '4.0.24',
329+
os: {
330+
os: 'linux',
331+
dist: 'fedora',
332+
release: '34',
333+
},
334+
});
335+
336+
expect(await du.getDownloadUrl()).toBe(
337+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-4.0.24.tgz'
338+
);
339+
});
340+
});
305341
});
306342

307343
describe('for win32 & windows', () => {

0 commit comments

Comments
 (0)