Updating SDK extension tests
This commit is contained in:
Родитель
9d6b257f7f
Коммит
e62b0af47d
|
@ -1,6 +0,0 @@
|
|||
/* --------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
export * from './src/extension';
|
|
@ -34,7 +34,7 @@
|
|||
"onCommand:dotnet.reportIssue"
|
||||
],
|
||||
"main": "./dist/extension.js",
|
||||
"types": "./index.d.ts",
|
||||
"types": "./dist/extension.d.ts",
|
||||
"contributes": {
|
||||
"commands": [
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace configKeys {
|
|||
export const enableTelemetry = 'enableTelemetry';
|
||||
export const existingPath = 'existingDotnetPath';
|
||||
}
|
||||
export namespace commandKeys {
|
||||
namespace commandKeys {
|
||||
export const acquire = 'acquire';
|
||||
export const uninstallAll = 'uninstallAll';
|
||||
export const showAcquisitionLog = 'showAcquisitionLog';
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
],
|
||||
"sourceMap": true,
|
||||
"rootDir": "src",
|
||||
"declaration": true,
|
||||
"strict": true /* enable all strict type-checking options */
|
||||
},
|
||||
"exclude": [
|
||||
|
|
|
@ -44,12 +44,13 @@ suite('DotnetCoreAcquisitionExtension End to End', function() {
|
|||
});
|
||||
|
||||
this.afterEach(async () => {
|
||||
this.timeout(20000);
|
||||
// Tear down tmp storage for fresh run
|
||||
await vscode.commands.executeCommand<string>('dotnet-sdk.uninstallAll');
|
||||
mockState.clear();
|
||||
MockTelemetryReporter.telemetryEvents = [];
|
||||
rimraf.sync(storagePath);
|
||||
}).timeout(20000);
|
||||
});
|
||||
|
||||
test('Activate', async () => {
|
||||
// Commands should now be registered
|
||||
|
@ -76,4 +77,22 @@ suite('DotnetCoreAcquisitionExtension End to End', function() {
|
|||
await vscode.commands.executeCommand('dotnet-sdk.uninstallAll');
|
||||
assert.isFalse(fs.existsSync(result!.dotnetPath));
|
||||
}).timeout(100000);
|
||||
|
||||
test('Install Multiple Versions', async () => {
|
||||
const versions = ['3.1', '5.0'];
|
||||
let dotnetPaths: string[] = [];
|
||||
for (const version of versions) {
|
||||
const result = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet-sdk.acquire', { version });
|
||||
assert.exists(result);
|
||||
assert.exists(result!.dotnetPath);
|
||||
assert.include(result!.dotnetPath, version);
|
||||
if (result!.dotnetPath) {
|
||||
dotnetPaths = dotnetPaths.concat(result!.dotnetPath);
|
||||
}
|
||||
}
|
||||
// All versions are still there after all installs are completed
|
||||
for (const dotnetPath of dotnetPaths) {
|
||||
assert.isTrue(fs.existsSync(dotnetPath));
|
||||
}
|
||||
}).timeout(600000);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче