Skip to content

Commit 2ffc024

Browse files
committed
fix(MongoBinaryDownloadUrl): add mapping for Linux Mint 22
even though there are still no ubuntu 24.04 binaries
1 parent 6cdae78 commit 2ffc024

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

docs/guides/supported-systems.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Default version is `7`
126126

127127
(uses mongodb's `ubuntu` release)<br/>
128128
Lowest supported Distribution version is `17`<br/>
129-
Highest version is `21`<br/>
129+
Highest version is `22`<br/>
130130
Default version is `21`
131131

132132
### Suse

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
481481
19: '18.04',
482482
20: '20.04',
483483
21: '22.04',
484+
22: '24.04',
484485
};
485486

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

592593
if (ubuntuYear > highestUbuntuYear) {
593594
log(

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,15 @@ describe('MongoBinaryDownloadUrl', () => {
10711071
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.4.tgz'
10721072
);
10731073
});
1074+
1075+
it('should return a archive name for Linux Mint 21', async () => {
1076+
(downloadUrl.os as LinuxOS).release = '22';
1077+
downloadUrl.version = '7.0.11';
1078+
// NOTE: there are currently no binaries for ubuntu 24.04, but 22.04 still work
1079+
expect(await downloadUrl.getDownloadUrl()).toBe(
1080+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.11.tgz'
1081+
);
1082+
});
10741083
});
10751084

10761085
describe('for fedora', () => {

0 commit comments

Comments
 (0)