Bump test projects up to .NET 4.5.2
- aspnet/Testing#248 - xUnit no longer supports .NET 4.5.1 - build tests for desktop .NET only on Windows Address existing issues - work around test failures, including #350 - skip tests mentioned in #350 - reorder xunit and xunit.runner.visualstudio; setup fails for .NET Core otherwise - skip all tests using LocalDB on Linux and OSX - `[FrameworkSkipCondition(RuntimeFrameworks.Mono)]` now redundant - correct AppVeyor image nits: - let VS add the test `<Service>` - use `[ConditionalFact]` when there's no test data
This commit is contained in:
parent
01d2c102fc
commit
c354afebc8
|
|
@ -7,8 +7,8 @@ branches:
|
|||
- dev
|
||||
- /^(.*\/)?ci-.*$/
|
||||
build_script:
|
||||
- build.cmd verify
|
||||
- build.cmd --quiet verify
|
||||
clone_depth: 1
|
||||
test: off
|
||||
deploy: off
|
||||
os: Visual Studio 2015
|
||||
os: Visual Studio 2017 RC
|
||||
|
|
|
|||
|
|
@ -77,8 +77,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Existing_database_not_using_migrations_exception_passes_thru()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContext, DatabaseErrorButNoMigrationsMiddleware>();
|
||||
|
|
@ -105,8 +106,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Error_page_displayed_no_migrations()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContext, NoMigrationsMiddleware>();
|
||||
|
|
@ -133,8 +135,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Error_page_displayed_pending_migrations()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContextWithMigrations, PendingMigrationsMiddleware>();
|
||||
|
|
@ -165,8 +168,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Error_page_displayed_pending_model_changes()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContextWithPendingModelChanges, PendingModelChangesMiddleware>();
|
||||
|
|
@ -196,8 +200,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Error_page_then_apply_migrations()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContextWithMigrations, ApplyMigrationsMiddleware>();
|
||||
|
|
@ -247,8 +252,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Customize_migrations_end_point()
|
||||
{
|
||||
var migrationsEndpoint = "/MyCustomEndPoints/ApplyMyMigrationsHere";
|
||||
|
|
@ -285,8 +291,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Pass_thru_when_context_not_in_services()
|
||||
{
|
||||
using (var database = SqlServerTestStore.CreateScratch())
|
||||
|
|
@ -340,8 +347,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Pass_thru_when_exception_in_logic()
|
||||
{
|
||||
using (var database = SqlServerTestStore.CreateScratch())
|
||||
|
|
@ -372,8 +380,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact(Skip = "aspnet/Diagnostics#350")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Error_page_displayed_when_exception_wrapped()
|
||||
{
|
||||
TestServer server = SetupTestServer<BloggingContext, WrappedExceptionMiddleware>();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -11,8 +12,12 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -50,15 +50,17 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Migration_request_default_path()
|
||||
{
|
||||
await Migration_request(useCustomPath: false);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Migration_request_custom_path()
|
||||
{
|
||||
await Migration_request(useCustomPath: true);
|
||||
|
|
@ -187,8 +189,9 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
|||
Assert.True(content.Length > 512);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Exception_while_applying_migrations()
|
||||
{
|
||||
using (var database = SqlServerTestStore.CreateScratch())
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Xunit;
|
|||
|
||||
namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests
|
||||
{
|
||||
#if NET451
|
||||
#if NET452
|
||||
public class DataStoreErrorLoggerTest
|
||||
{
|
||||
private const string _name = "test";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -12,8 +13,12 @@
|
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
|
||||
<PackageReference Include="Moq" Version="4.6.36-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="'$(TargetFramework)'!='netcoreapp1.1'">win7-x64</RuntimeIdentifier>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<PublicSign>false</PublicSign>
|
||||
|
|
@ -21,8 +22,12 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ namespace Microsoft.AspNetCore.Diagnostics.Tests
|
|||
Assert.Empty(store.GetActivities());
|
||||
}
|
||||
|
||||
#if NET451
|
||||
#if NET452
|
||||
private static void DomainFunc()
|
||||
{
|
||||
var t = SetUp();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -22,8 +23,12 @@
|
|||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
|
||||
<PackageReference Include="Moq" Version="4.6.36-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -14,8 +15,12 @@
|
|||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-*" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue