Skip to content

Commit

Permalink
fix(MongoBinaryDownloadUrl): add mapping for Linux Mint 22
Browse files Browse the repository at this point in the history
even though there are still no ubuntu 24.04 binaries
  • Loading branch information
hasezoey committed Jul 2, 2024
1 parent 6cdae78 commit 2ffc024
Show file tree
Hide file tree
Showing 3 changed files with 12 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 @@ -126,7 +126,7 @@ Default version is `7`

(uses mongodb's `ubuntu` release)<br/>
Lowest supported Distribution version is `17`<br/>
Highest version is `21`<br/>
Highest version is `22`<br/>
Default version is `21`

### Suse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
19: '18.04',
20: '20.04',
21: '22.04',
22: '24.04',
};

ubuntuOS = {
Expand Down Expand Up @@ -587,7 +588,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
* Highest ubuntu year supported by mongodb binaries
* @see https://www.mongodb.com/download-center/community/releases/archive
*/
const highestUbuntuYear = 22; // 22 is the highest supported as of mongodb 7.0.9
const highestUbuntuYear = 22; // 22 is the highest supported as of mongodb 7.0.11

if (ubuntuYear > highestUbuntuYear) {
log(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,15 @@ describe('MongoBinaryDownloadUrl', () => {
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz'
);
});

it('should return a archive name for Linux Mint 21', async () => {
(downloadUrl.os as LinuxOS).release = '22';
downloadUrl.version = '7.0.11';
// NOTE: there are currently no binaries for ubuntu 24.04, but 22.04 still work
expect(await downloadUrl.getDownloadUrl()).toBe(
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.11.tgz'
);
});
});

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

0 comments on commit 2ffc024

Please sign in to comment.