|  | 
| 7 | 7 | 
 | 
| 8 | 8 | import * as assert from 'assert'; | 
| 9 | 9 | import * as TypeMoq from 'typemoq'; | 
| 10 |  | -import { LanguageServerDownloader } from '../../client/activation/downloader'; | 
|  | 10 | +import { DownloadLinks, LanguageServerDownloader } from '../../client/activation/downloader'; | 
|  | 11 | +import { PlatformName } from '../../client/activation/platformData'; | 
| 11 | 12 | import { IFileSystem, IPlatformService } from '../../client/common/platform/types'; | 
| 12 | 13 | import { IOutputChannel } from '../../client/common/types'; | 
| 13 | 14 | import { IServiceContainer } from '../../client/ioc/types'; | 
| 14 | 15 | 
 | 
| 15 |  | -const downloadUriPrefix = 'https://pvsc.blob.core.windows.net/python-language-server'; | 
| 16 |  | -const downloadBaseFileName = 'Python-Language-Server'; | 
| 17 |  | -const downloadVersion = '0.1.0'; | 
| 18 |  | -const downloadFileExtension = '.nupkg'; | 
| 19 |  | - | 
| 20 | 16 | suite('Activation - Downloader', () => { | 
| 21 | 17 |  let languageServerDownloader: LanguageServerDownloader; | 
| 22 | 18 |  let serviceContainer: TypeMoq.IMock<IServiceContainer>; | 
| @@ -48,21 +44,21 @@ suite('Activation - Downloader', () => { | 
| 48 | 44 |  test('Windows 32Bit', async () => { | 
| 49 | 45 |  setupPlatform({ windows: true }); | 
| 50 | 46 |  const link = await languageServerDownloader.getDownloadUri(); | 
| 51 |  | - assert.equal(link, `${downloadUriPrefix}/${downloadBaseFileName}-win-x86.${downloadVersion}${downloadFileExtension}`); | 
|  | 47 | + assert.equal(link, DownloadLinks[PlatformName.Windows32Bit]); | 
| 52 | 48 |  }); | 
| 53 | 49 |  test('Windows 64Bit', async () => { | 
| 54 | 50 |  setupPlatform({ windows: true, is64Bit: true }); | 
| 55 | 51 |  const link = await languageServerDownloader.getDownloadUri(); | 
| 56 |  | - assert.equal(link, `${downloadUriPrefix}/${downloadBaseFileName}-win-x64.${downloadVersion}${downloadFileExtension}`); | 
|  | 52 | + assert.equal(link, DownloadLinks[PlatformName.Windows64Bit]); | 
| 57 | 53 |  }); | 
| 58 | 54 |  test('Mac 64Bit', async () => { | 
| 59 | 55 |  setupPlatform({ mac: true, is64Bit: true }); | 
| 60 | 56 |  const link = await languageServerDownloader.getDownloadUri(); | 
| 61 |  | - assert.equal(link, `${downloadUriPrefix}/${downloadBaseFileName}-osx-x64.${downloadVersion}${downloadFileExtension}`); | 
|  | 57 | + assert.equal(link, DownloadLinks[PlatformName.Mac64Bit]); | 
| 62 | 58 |  }); | 
| 63 | 59 |  test('Linux 64Bit', async () => { | 
| 64 | 60 |  setupPlatform({ linux: true, is64Bit: true }); | 
| 65 | 61 |  const link = await languageServerDownloader.getDownloadUri(); | 
| 66 |  | - assert.equal(link, `${downloadUriPrefix}/${downloadBaseFileName}-linux-x64.${downloadVersion}${downloadFileExtension}`); | 
|  | 62 | + assert.equal(link, DownloadLinks[PlatformName.Linux64Bit]); | 
| 67 | 63 |  }); | 
| 68 | 64 | }); | 
0 commit comments