Skip to content

Commit 29763b9

Browse files
committed
test(MongoBinaryDownloadUrl): add test for "getDebianVersionString" and mdb 4.4 and debian10
1 parent 25c865c commit 29763b9

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,13 @@ describe('MongoBinaryDownloadUrl', () => {
513513
});
514514

515515
describe('getDebianVersionString()', () => {
516-
const downloadUrl = new MongoBinaryDownloadUrl({
517-
platform: 'linux',
518-
arch: 'x64',
519-
version: '3.6.3',
516+
let downloadUrl: MongoBinaryDownloadUrl;
517+
beforeEach(() => {
518+
downloadUrl = new MongoBinaryDownloadUrl({
519+
platform: 'linux',
520+
arch: 'x64',
521+
version: '3.6.3',
522+
});
520523
});
521524

522525
it('should return a archive name for debian 6.2', () => {
@@ -578,6 +581,17 @@ describe('MongoBinaryDownloadUrl', () => {
578581
})
579582
).toBe('debian92');
580583
});
584+
585+
it('should return debian10 release-archive for debian 10.0 and mongodb 4.4', () => {
586+
downloadUrl.version = '4.4.0';
587+
expect(
588+
downloadUrl.getDebianVersionString({
589+
os: 'linux',
590+
dist: 'debian',
591+
release: '10.0',
592+
})
593+
).toBe('debian10');
594+
});
581595
});
582596

583597
describe('getLegacyVersionString()', () => {

0 commit comments

Comments
 (0)