diff --git a/packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts b/packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts index e0721f98c..d06a445b7 100644 --- a/packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts +++ b/packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts @@ -289,7 +289,9 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts { throw new UnknownVersionError(this.version); } - if (release >= 11 || ['unstable', 'testing'].includes(os.release)) { + const isTesting = ['unstable', 'testing', ''].includes(os.release); + + if (isTesting || release >= 11) { // Debian 11 is compatible with the binaries for debian 10 // but does not have binaries for before 5.0.8 // and only set to use "debian10" if the requested version is not a latest version @@ -309,7 +311,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts { name += '71'; } - if (release >= 10) { + if (isTesting || release >= 10) { if (semver.lt(coercedVersion, '4.2.1') && !testVersionIsLatest(this.version)) { throw new KnownVersionIncompatibilityError( `Debian ${release}`,