Skip to content

Commit 012d652

Browse files
msanguinetinodkz
authored andcommitted
fix: add debian v10 downloads
* fix: add debian buster downloads closes #204 * fix: linting problem with prettier Couldn't lint on my machine, sorry. * fix: failing test * fix: add test for debian buster download * fix: lint problem
1 parent 16ac659 commit 012d652

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export default class MongoBinaryDownloadUrl {
129129
getDebianVersionString(os: getos.Os): string {
130130
let name = 'debian';
131131
const release: number = parseFloat((os as getos.LinuxOs).release);
132-
if (release >= 9 || (os as getos.LinuxOs).release === 'unstable') {
132+
if (release >= 10 || (os as getos.LinuxOs).release === 'unstable') {
133+
name += '10';
134+
} else if (release >= 9) {
133135
name += '92';
134136
} else if (release >= 8.1) {
135137
name += '81';

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,16 @@ describe('MongoBinaryDownloadUrl', () => {
232232
})
233233
).toBe('debian92');
234234
});
235+
236+
it('should return a archive name for debian 10.0', () => {
237+
expect(
238+
downloadUrl.getDebianVersionString({
239+
os: 'linux',
240+
dist: 'debian',
241+
release: '10.0',
242+
})
243+
).toBe('debian10');
244+
});
235245
});
236246

237247
describe('getMintVersionString', () => {

0 commit comments

Comments
 (0)