From cbfd791d7b929ec86be5c7792c6f7f3fa8f3b7f8 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Mon, 9 Jul 2018 09:54:48 -0700 Subject: [PATCH] Make facts and theories conditional (#1023) --- .../InProcess/StartupTests.cs | 2 +- .../OutOfProcess/GlobalVersionTests.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/IISExpress.FunctionalTests/InProcess/StartupTests.cs b/test/IISExpress.FunctionalTests/InProcess/StartupTests.cs index 14bdceb024..5fbc821d29 100644 --- a/test/IISExpress.FunctionalTests/InProcess/StartupTests.cs +++ b/test/IISExpress.FunctionalTests/InProcess/StartupTests.cs @@ -120,7 +120,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests Assert.Equal("Hello World", responseText); } - [Fact] + [ConditionalFact] public async Task DetectsOveriddenServer() { var deploymentResult = await DeployAsync(GetBaseDeploymentParameters("OverriddenServerWebSite")); diff --git a/test/IISExpress.FunctionalTests/OutOfProcess/GlobalVersionTests.cs b/test/IISExpress.FunctionalTests/OutOfProcess/GlobalVersionTests.cs index 3edfdafb22..fd53c0ffbb 100644 --- a/test/IISExpress.FunctionalTests/OutOfProcess/GlobalVersionTests.cs +++ b/test/IISExpress.FunctionalTests/OutOfProcess/GlobalVersionTests.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using System.Xml.Linq; using Microsoft.AspNetCore.Server.IIS.FunctionalTests.Utilities; using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Testing.xunit; using Xunit; using Xunit.Abstractions; @@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests private const string _helloWorldResponse = "Hello World"; private const string _outOfProcessVersionVariable = "/p:AspNetCoreModuleOutOfProcessVersion="; - [Fact] + [ConditionalFact] public async Task GlobalVersion_DefaultWorks() { var deploymentParameters = GetGlobalVersionBaseDeploymentParameters(); @@ -45,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests Assert.Equal(_helloWorldResponse, responseText); } - [Theory] // Tests need to publish to change folder locations + [ConditionalTheory] [InlineData("2.1.0")] [InlineData("2.1.0-preview")] public async Task GlobalVersion_NewVersionNumber_Fails(string version) @@ -60,7 +61,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests Assert.False(response.IsSuccessStatusCode); } - [Theory] // Tests need to publish to change folder locations + [ConditionalTheory] [InlineData("2.1.0")] [InlineData("2.1.0-preview")] public async Task GlobalVersion_NewVersionNumber(string version) @@ -78,7 +79,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests AssertLoadedVersion(version); } - [Theory] // Tests need to publish to change folder locations + [ConditionalTheory] [InlineData("2.1.0")] [InlineData("2.1.0-preview")] public async Task GlobalVersion_MultipleRequestHandlers_PicksHighestOne(string version) @@ -103,7 +104,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests AssertLoadedVersion(version); } - [Theory] + [ConditionalTheory] [InlineData("2.1.0")] [InlineData("2.1.0-preview")] public async Task GlobalVersion_MultipleRequestHandlers_UpgradeWorks(string version)