Skip to content

Commit dd66037

Browse files
committed
feat(MongoBinaryDownloadUrl): support rhel93 binaries
1 parent 76b6d66 commit dd66037

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

docs/guides/supported-systems.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ There are currently no newer mongodb builds that support the newer provided open
9494

9595
(uses mongodb's `rhel` release)<br/>
9696
Lowest supported Distribution version is `5`<br/>
97-
Highest version is `9` (higher versions will be clamped to this value)<br/>
97+
Highest version is `9.3` (higher versions will be clamped to this value)<br/>
9898
Default version is `70`<br/>
9999
Architectures Supported: `x86_64`, `arm64`(`aarch64`)
100100

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,10 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
408408
}
409409
}
410410

411-
if (semver.satisfies(releaseAsSemver, '>=9.0.0')) {
411+
if (semver.satisfies(releaseAsSemver, '>=9.3.0')) {
412+
// since mongodb 8.0.0 there are only binaries for `rhel93`, no more `rhel90`
413+
name += '93';
414+
} else if (semver.satisfies(releaseAsSemver, '>=9.0.0')) {
412415
// there are only binaries for rhel90 since 6.0.4
413416
name += '90';
414417
} else if (semver.satisfies(releaseAsSemver, '8.2.0') && this.arch == 'aarch64') {

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,38 @@ describe('MongoBinaryDownloadUrl', () => {
15981598
);
15991599
});
16001600

1601+
it('rhel 9.3 (x86_64) & 8.0.0', async () => {
1602+
const du = new MongoBinaryDownloadUrl({
1603+
platform: 'linux',
1604+
arch: 'x64',
1605+
version: '8.0.0',
1606+
os: {
1607+
os: 'linux',
1608+
dist: 'rhel',
1609+
release: '9.3',
1610+
},
1611+
});
1612+
expect(await du.getDownloadUrl()).toBe(
1613+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel93-8.0.0.tgz'
1614+
);
1615+
});
1616+
1617+
it('rhel 9.3 (arm64) & 8.0.0', async () => {
1618+
const du = new MongoBinaryDownloadUrl({
1619+
platform: 'linux',
1620+
arch: 'arm64',
1621+
version: '8.0.0',
1622+
os: {
1623+
os: 'linux',
1624+
dist: 'rhel',
1625+
release: '9.3',
1626+
},
1627+
});
1628+
expect(await du.getDownloadUrl()).toBe(
1629+
'https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-rhel93-8.0.0.tgz'
1630+
);
1631+
});
1632+
16011633
it('rocky linux 9.2 (x86_64) & 6.0.4 (using rhel90)', async () => {
16021634
// lowest rhel 9 x64 supported version is 6.0.4
16031635
const du = new MongoBinaryDownloadUrl({

0 commit comments

Comments
 (0)