Skip to content

Commit 7c2d490

Browse files
committed
fix(MongoBinaryDownloadUrl::getRhelVersionString): handle versions above 8
by falling back to rhel 8 instead of complete fallback
1 parent 10d1749 commit 7c2d490

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
347347

348348
// rhel aarch64 support is only for rhel 8.2 (and no version after explicitly)
349349
name += '82';
350-
} else if (semver.satisfies(releaseAsSemver, '^8.0.0')) {
350+
} else if (semver.satisfies(releaseAsSemver, '>=8.0.0')) {
351351
name += '80';
352352
} else if (semver.satisfies(releaseAsSemver, '^7.0.0')) {
353353
name += '70';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ describe('MongoBinaryDownloadUrl', () => {
10391039
},
10401040
});
10411041
expect(await du.getDownloadUrl()).toBe(
1042-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-v5.0-latest.tgz'
1042+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-v5.0-latest.tgz'
10431043
);
10441044
});
10451045

0 commit comments

Comments
 (0)