Skip to content

Commit

Permalink
fix(MongoBinaryDownloadUrl): add Ubuntu 18.04 builds
Browse files Browse the repository at this point in the history
* Ubuntu versions list updated

* Check major ubuntu version only

* Added unit test for Ubuntu 18.04 release
  • Loading branch information
YuriGor authored and nodkz committed Oct 26, 2018
1 parent 132df61 commit b16d75a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ node_modules

coverage
.nyc_output
package-lock.json
2 changes: 2 additions & 0 deletions src/util/MongoBinaryDownloadUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ export default class MongoBinaryDownloadUrl {
name += '1604';
} else if (majorVer === 16) {
name += '1604';
} else if (majorVer === 18) {
name += '1804';
} else {
name += '1404';
}
Expand Down
8 changes: 8 additions & 0 deletions src/util/__tests__/MongoBinaryDownloadUrl-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ describe('MongoBinaryDownloadUrl', () => {
})
).toBe('ubuntu1204');
});
it('should return a archive name for Ubuntu 18.04', () => {
expect(
downloadUrl.getUbuntuVersionString({
dist: 'Ubuntu Linux',
release: '18.04',
})
).toBe('ubuntu1804');
});
});

describe('getDebianVersionString()', () => {
Expand Down

0 comments on commit b16d75a

Please sign in to comment.