Skip to content

Commit 064c69e

Browse files
committed
fix(MongoBinaryDownloadUrl): support elementaryos 7
1 parent e756164 commit 064c69e

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

docs/guides/supported-systems.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Default version is `1`
117117

118118
(uses mongodb's `ubuntu` release)<br/>
119119
Lowest supported Distribution version is `3` (or `0.3`)<br/>
120-
Highest version is `6`<br/>
120+
Highest version is `7`<br/>
121121
Default version is `6`
122122

123123
### Linux Mint

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

+2
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
487487
4: '16.04',
488488
5: '18.04',
489489
6: '20.04',
490+
7: '22.04',
490491
};
491492

492493
// untangle elemenatary versioning from hell https://en.wikipedia.org/wiki/Elementary_OS#Development
@@ -496,6 +497,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
496497
ubuntuOS = {
497498
os: 'linux',
498499
dist: 'ubuntu',
500+
// TODO: next-minor: change default elemenatry release to 7
499501
release: elementaryToUbuntuRelease[realMajor] || elementaryToUbuntuRelease[6],
500502
};
501503
}

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

+21-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ describe('MongoBinaryDownloadUrl', () => {
879879
platform: 'linux',
880880
arch: 'x64',
881881
version: '5.0.0',
882-
// from "elementary/docker:fe08f970723a"
882+
// from "elementary/docker:odin-stable" (id: 1a8a0700e015)
883883
os: {
884884
os: 'linux',
885885
dist: 'elementary',
@@ -893,6 +893,26 @@ describe('MongoBinaryDownloadUrl', () => {
893893
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.0.tgz'
894894
);
895895
});
896+
897+
it('should return a archive name for elementary 7.0', async () => {
898+
const du = new MongoBinaryDownloadUrl({
899+
platform: 'linux',
900+
arch: 'x64',
901+
version: '6.0.4',
902+
// from "elementary/docker:horus-stable" (id: a43c2a2e2cf2)
903+
os: {
904+
os: 'linux',
905+
dist: 'elementary',
906+
codename: 'horus',
907+
release: '7',
908+
id_like: ['ubuntu'],
909+
},
910+
});
911+
912+
expect(await du.getDownloadUrl()).toBe(
913+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz'
914+
);
915+
});
896916
});
897917

898918
describe('for LinuxMint', () => {

0 commit comments

Comments
 (0)