-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix binary download on debian testing/unstable
VERSION_ID was removed. See https://tracker.debian.org/news/1433360/accepted-base-files-13-source-into-unstable/ and a similar bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008735
- Loading branch information
Showing
6 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import MongoBinary from '../../util/MongoBinary'; | ||
import { getOS, isDebian10OrHigher } from '../../util/getos'; | ||
import resolveConfig, { ResolveConfigVariables } from '../../util/resolveConfig'; | ||
import { assertion, isNullOrUndefined } from '../../util/utils'; | ||
|
||
export = async function globalSetup(): Promise<void> { | ||
const defaultVersion = resolveConfig(ResolveConfigVariables.VERSION); | ||
assertion(!isNullOrUndefined(defaultVersion), new Error('Default version is not defined')); | ||
const versions = [defaultVersion, '4.0.28', '4.2.23', '4.4.22', '5.0.19', '6.0.6']; | ||
const isNewDebian = isDebian10OrHigher(await getOS()); | ||
// Ensure all required versions are downloaded for tests | ||
for (const version of versions) { | ||
await MongoBinary.getPath({ version }); | ||
if (!isNewDebian || parseFloat(version) >= 4.2) { | ||
await MongoBinary.getPath({ version }); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters