forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for advertising workload updates for VS-installed workloads
- Loading branch information
1 parent
c830887
commit 33709c5
Showing
3 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.DotNet.MsiInstallerTests.Framework; | ||
|
||
namespace Microsoft.DotNet.MsiInstallerTests | ||
{ | ||
public class VSWorkloadTests : VMTestBase | ||
{ | ||
public VSWorkloadTests(ITestOutputHelper log) : base(log) | ||
{ | ||
VM.SetCurrentState("Install VS 17.10 Preview 6"); | ||
DeployStage2Sdk(); | ||
} | ||
|
||
[Fact] | ||
public void WorkloadListShowsVSInstalledWorkloads() | ||
{ | ||
var result = VM.CreateRunCommand("dotnet", "workload", "list") | ||
.WithIsReadOnly(true) | ||
.Execute(); | ||
|
||
result.Should().Pass(); | ||
|
||
result.Should().HaveStdOutContaining("aspire"); | ||
} | ||
|
||
[Fact] | ||
public void UpdatesAreAdvertisedForVSInstalledWorkloads() | ||
{ | ||
AddNuGetSource("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json"); | ||
|
||
VM.CreateRunCommand("dotnet", "new", "classlib", "-o", "LibraryTest") | ||
.WithWorkingDirectory(@"C:\SdkTesting") | ||
.Execute() | ||
.Should() | ||
.Pass(); | ||
|
||
// build (or any restoring) command should check for and notify of updates | ||
VM.CreateRunCommand("dotnet", "build") | ||
.WithWorkingDirectory(@"C:\SdkTesting\LibraryTest") | ||
.Execute().Should().Pass() | ||
.And.HaveStdOutContaining("Workload updates are available"); | ||
|
||
// Workload list should list the specific workloads that have updates | ||
VM.CreateRunCommand("dotnet", "workload", "list") | ||
.WithIsReadOnly(true) | ||
.Execute() | ||
.Should() | ||
.Pass() | ||
.And | ||
.HaveStdOutContaining("Updates are available for the following workload(s): aspire"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters