Skip to content

Commit

Permalink
fix(MongoBinaryDownloadUrl): support elementaryos 7
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Jan 17, 2024
1 parent e756164 commit 064c69e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guides/supported-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Default version is `1`

(uses mongodb's `ubuntu` release)<br/>
Lowest supported Distribution version is `3` (or `0.3`)<br/>
Highest version is `6`<br/>
Highest version is `7`<br/>
Default version is `6`

### Linux Mint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
4: '16.04',
5: '18.04',
6: '20.04',
7: '22.04',
};

// untangle elemenatary versioning from hell https://en.wikipedia.org/wiki/Elementary_OS#Development
Expand All @@ -496,6 +497,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
ubuntuOS = {
os: 'linux',
dist: 'ubuntu',
// TODO: next-minor: change default elemenatry release to 7
release: elementaryToUbuntuRelease[realMajor] || elementaryToUbuntuRelease[6],
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ describe('MongoBinaryDownloadUrl', () => {
platform: 'linux',
arch: 'x64',
version: '5.0.0',
// from "elementary/docker:fe08f970723a"
// from "elementary/docker:odin-stable" (id: 1a8a0700e015)
os: {
os: 'linux',
dist: 'elementary',
Expand All @@ -893,6 +893,26 @@ describe('MongoBinaryDownloadUrl', () => {
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.0.tgz'
);
});

it('should return a archive name for elementary 7.0', async () => {
const du = new MongoBinaryDownloadUrl({
platform: 'linux',
arch: 'x64',
version: '6.0.4',
// from "elementary/docker:horus-stable" (id: a43c2a2e2cf2)
os: {
os: 'linux',
dist: 'elementary',
codename: 'horus',
release: '7',
id_like: ['ubuntu'],
},
});

expect(await du.getDownloadUrl()).toBe(
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz'
);
});
});

describe('for LinuxMint', () => {
Expand Down

0 comments on commit 064c69e

Please sign in to comment.