Update tests for .NET Core 3.0

This commit is contained in:
Daniel Plaisted 2018-07-09 10:25:13 -07:00
parent cf0441cf6e
commit 75e0dbb45d
3 changed files with 31 additions and 13 deletions

View file

@ -16,7 +16,7 @@ namespace EndToEnd
{
private const string AspNetTestProject = "TestWebAppSimple";
[Fact]
[Fact(Skip ="https://github.com/dotnet/core-sdk/issues/21")]
public void PortablePublishWithLatestTFMUsesBundledAspNetCoreAppVersion()
{
var _testInstance = TestAssets.Get(AspNetTestProject)
@ -56,7 +56,7 @@ namespace EndToEnd
"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()
{
var _testInstance = TestAssets.Get(AspNetTestProject)
@ -102,7 +102,7 @@ namespace EndToEnd
"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))]
public void ItRollsForwardToTheLatestVersion(string minorVersion)
{
@ -172,7 +172,7 @@ namespace EndToEnd
"(see MSBuildExtensions.targets in this repo)");
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/core-sdk/issues/21")]
public void WeCoverLatestAspNetCoreAppRollForward()
{
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
@ -209,12 +209,15 @@ namespace EndToEnd
?.Version;
}
public static string LatestSupportedAspNetCoreAppVersion = "2.2";
public static string LatestSupportedAspNetCoreAppVersion = "3.0";
public static IEnumerable<object[]> SupportedAspNetCoreAppVersions
{
get
{
yield return new object[] { "2.1" };
// 2.2 not yet stable
//yield return new object[] { "2.2" };
yield return new object[] { LatestSupportedAspNetCoreAppVersion };
}
}

View file

@ -124,7 +124,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
new DotnetCommand()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput(
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.2 portable")
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp3.0 portable")
.Should().Pass()
.And.HaveStdOutContaining("Hello Portable World!");;
}

View file

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Xml.Linq;
using FluentAssertions;
@ -129,13 +130,27 @@ namespace EndToEnd
{
get
{
return new[]
{
"1.0",
"1.1",
"2.0",
"2.1"
}.Select(version => new object[] { version });
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.1",
});
}
versions.AddRange(new[]
{
"2.0",
"2.1",
"3.0"
});
return versions.Select(version => new object[] { version });
}
}
}