From 75e0dbb45d7cadea5477da99d077db05753bd171 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 9 Jul 2018 10:25:13 -0700 Subject: [PATCH] Update tests for .NET Core 3.0 --- .../GivenAspNetAppsResolveImplicitVersions.cs | 13 +++++---- test/EndToEnd/GivenDotNetUsesMSBuild.cs | 2 +- .../GivenSelfContainedAppsRollForward.cs | 29 ++++++++++++++----- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/test/EndToEnd/GivenAspNetAppsResolveImplicitVersions.cs b/test/EndToEnd/GivenAspNetAppsResolveImplicitVersions.cs index da7163646..9e3850e74 100644 --- a/test/EndToEnd/GivenAspNetAppsResolveImplicitVersions.cs +++ b/test/EndToEnd/GivenAspNetAppsResolveImplicitVersions.cs @@ -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 SupportedAspNetCoreAppVersions { get { + yield return new object[] { "2.1" }; + // 2.2 not yet stable + //yield return new object[] { "2.2" }; yield return new object[] { LatestSupportedAspNetCoreAppVersion }; } } diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs index 8a7e26c41..2aeabc9d4 100644 --- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs +++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs @@ -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!");; } diff --git a/test/EndToEnd/GivenSelfContainedAppsRollForward.cs b/test/EndToEnd/GivenSelfContainedAppsRollForward.cs index 080197472..192b968b2 100644 --- a/test/EndToEnd/GivenSelfContainedAppsRollForward.cs +++ b/test/EndToEnd/GivenSelfContainedAppsRollForward.cs @@ -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(); + + // 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 }); } } }