Skip to content

Commit b16d75a

Browse files
YuriGornodkz
authored andcommitted
fix(MongoBinaryDownloadUrl): add Ubuntu 18.04 builds
* Ubuntu versions list updated * Check major ubuntu version only * Added unit test for Ubuntu 18.04 release
1 parent 132df61 commit b16d75a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ node_modules
4444

4545
coverage
4646
.nyc_output
47+
package-lock.json

src/util/MongoBinaryDownloadUrl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ export default class MongoBinaryDownloadUrl {
200200
name += '1604';
201201
} else if (majorVer === 16) {
202202
name += '1604';
203+
} else if (majorVer === 18) {
204+
name += '1804';
203205
} else {
204206
name += '1404';
205207
}

src/util/__tests__/MongoBinaryDownloadUrl-test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ describe('MongoBinaryDownloadUrl', () => {
117117
})
118118
).toBe('ubuntu1204');
119119
});
120+
it('should return a archive name for Ubuntu 18.04', () => {
121+
expect(
122+
downloadUrl.getUbuntuVersionString({
123+
dist: 'Ubuntu Linux',
124+
release: '18.04',
125+
})
126+
).toBe('ubuntu1804');
127+
});
120128
});
121129

122130
describe('getDebianVersionString()', () => {

0 commit comments

Comments
 (0)