Update tests for .NET Core 3.0
This commit is contained in:
parent
cf0441cf6e
commit
75e0dbb45d
3 changed files with 31 additions and 13 deletions
|
@ -16,7 +16,7 @@ namespace EndToEnd
|
||||||
{
|
{
|
||||||
private const string AspNetTestProject = "TestWebAppSimple";
|
private const string AspNetTestProject = "TestWebAppSimple";
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip ="https://github.com/dotnet/core-sdk/issues/21")]
|
||||||
public void PortablePublishWithLatestTFMUsesBundledAspNetCoreAppVersion()
|
public void PortablePublishWithLatestTFMUsesBundledAspNetCoreAppVersion()
|
||||||
{
|
{
|
||||||
var _testInstance = TestAssets.Get(AspNetTestProject)
|
var _testInstance = TestAssets.Get(AspNetTestProject)
|
||||||
|
@ -56,7 +56,7 @@ namespace EndToEnd
|
||||||
"Please update MSBuildExtensions.targets in this repo so these versions match.");
|
"Please update MSBuildExtensions.targets in this repo so these versions match.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
|
||||||
public void StandalonePublishWithLatestTFMUsesBundledAspNetCoreAppVersion()
|
public void StandalonePublishWithLatestTFMUsesBundledAspNetCoreAppVersion()
|
||||||
{
|
{
|
||||||
var _testInstance = TestAssets.Get(AspNetTestProject)
|
var _testInstance = TestAssets.Get(AspNetTestProject)
|
||||||
|
@ -102,7 +102,7 @@ namespace EndToEnd
|
||||||
"Please update MSBuildExtensions.targets in this repo so these versions match.");
|
"Please update MSBuildExtensions.targets in this repo so these versions match.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
|
||||||
[MemberData(nameof(SupportedAspNetCoreAppVersions))]
|
[MemberData(nameof(SupportedAspNetCoreAppVersions))]
|
||||||
public void ItRollsForwardToTheLatestVersion(string minorVersion)
|
public void ItRollsForwardToTheLatestVersion(string minorVersion)
|
||||||
{
|
{
|
||||||
|
@ -172,7 +172,7 @@ namespace EndToEnd
|
||||||
"(see MSBuildExtensions.targets in this repo)");
|
"(see MSBuildExtensions.targets in this repo)");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
|
||||||
public void WeCoverLatestAspNetCoreAppRollForward()
|
public void WeCoverLatestAspNetCoreAppRollForward()
|
||||||
{
|
{
|
||||||
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
||||||
|
@ -209,12 +209,15 @@ namespace EndToEnd
|
||||||
?.Version;
|
?.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string LatestSupportedAspNetCoreAppVersion = "2.2";
|
public static string LatestSupportedAspNetCoreAppVersion = "3.0";
|
||||||
|
|
||||||
public static IEnumerable<object[]> SupportedAspNetCoreAppVersions
|
public static IEnumerable<object[]> SupportedAspNetCoreAppVersions
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
yield return new object[] { "2.1" };
|
||||||
|
// 2.2 not yet stable
|
||||||
|
//yield return new object[] { "2.2" };
|
||||||
yield return new object[] { LatestSupportedAspNetCoreAppVersion };
|
yield return new object[] { LatestSupportedAspNetCoreAppVersion };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
new DotnetCommand()
|
new DotnetCommand()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput(
|
.ExecuteWithCapturedOutput(
|
||||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.2 portable")
|
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp3.0 portable")
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
.And.HaveStdOutContaining("Hello Portable World!");;
|
.And.HaveStdOutContaining("Hello Portable World!");;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
@ -129,13 +130,27 @@ namespace EndToEnd
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new[]
|
|
||||||
|
var versions = new List<string>();
|
||||||
|
|
||||||
|
// Runtime 1.x deosn't support openSUSE and Fedora 27, so skip testing those versions on Linux
|
||||||
|
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
{
|
||||||
|
versions.AddRange(new[]
|
||||||
{
|
{
|
||||||
"1.0",
|
"1.0",
|
||||||
"1.1",
|
"1.1",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
versions.AddRange(new[]
|
||||||
|
{
|
||||||
"2.0",
|
"2.0",
|
||||||
"2.1"
|
"2.1",
|
||||||
}.Select(version => new object[] { version });
|
"3.0"
|
||||||
|
});
|
||||||
|
|
||||||
|
return versions.Select(version => new object[] { version });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue