Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split SQL Server functional tests into two projects #32953

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<IsUnitTestProject Condition=" '$(IsUnitTestProject)' == '' AND
'$(IsSpecificationTestProject)' != 'true' AND
( $(MSBuildProjectName.EndsWith('.Tests')) OR
$(MSBuildProjectName.EndsWith('.FunctionalTests'))) ">true</IsUnitTestProject>
$(MSBuildProjectName.Contains('.FunctionalTests'))) ">true</IsUnitTestProject>
<IsUnitTestProject Condition=" '$(IsUnitTestProject)' == '' ">false</IsUnitTestProject>
</PropertyGroup>

Expand Down
7 changes: 7 additions & 0 deletions EFCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Tests", "test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.FunctionalTests", "test\EFCore.SqlServer.FunctionalTests\EFCore.SqlServer.FunctionalTests.csproj", "{87AB43B7-767B-467B-9AA9-47BADF850D6A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.FunctionalTests2", "test\EFCore.SqlServer.FunctionalTests2\EFCore.SqlServer.FunctionalTests2.csproj", "{31E25750-483F-4F46-97AB-640D8A9E6F94}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Tests", "test\EFCore.SqlServer.Tests\EFCore.SqlServer.Tests.csproj", "{7D1C4E40-0DE6-4C50-AB84-CA8647EA92DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Tests", "test\EFCore.Tests\EFCore.Tests.csproj", "{313F46FE-9962-4A15-805F-FCBDF5A6181E}"
Expand Down Expand Up @@ -364,6 +366,10 @@ Global
{2AC6A8AC-5C0A-422A-B21A-CDC8D75F20A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AC6A8AC-5C0A-422A-B21A-CDC8D75F20A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AC6A8AC-5C0A-422A-B21A-CDC8D75F20A3}.Release|Any CPU.Build.0 = Release|Any CPU
{31E25750-483F-4F46-97AB-640D8A9E6F94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31E25750-483F-4F46-97AB-640D8A9E6F94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31E25750-483F-4F46-97AB-640D8A9E6F94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31E25750-483F-4F46-97AB-640D8A9E6F94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -425,6 +431,7 @@ Global
{01F86E65-6448-424C-AAB5-9C6427EF6FD4} = {258D5057-81B9-40EC-A872-D21E27452749}
{3D935B7D-80BD-49AD-BDC9-E1B0C9D9494F} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC}
{2AC6A8AC-5C0A-422A-B21A-CDC8D75F20A3} = {258D5057-81B9-40EC-A872-D21E27452749}
{31E25750-483F-4F46-97AB-640D8A9E6F94} = {258D5057-81B9-40EC-A872-D21E27452749}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {285A5EB4-BCF4-40EB-B9E1-DF6DBCB5E705}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.EntityFrameworkCore;

public class SqlServerComplianceTest : RelationalComplianceTestBase
{
protected override Assembly TargetAssembly { get; } = typeof(SqlServerComplianceTest).Assembly;
}
// public class SqlServerComplianceTest : RelationalComplianceTestBase
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix this if we decide to take this change.

// {
// protected override Assembly TargetAssembly { get; } = typeof(SqlServerComplianceTest).Assembly;
// }
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests2</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace>
<PreserveCompilationContext>true</PreserveCompilationContext>
<SkipTests Condition="'$(OS)' != 'Windows_NT' AND '$(Test__SqlServer__DefaultConnection)' == ''">True</SkipTests>
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Scaffolding\Baselines\**\*" />
</ItemGroup>

<ItemGroup>
<None Include="Scaffolding\Baselines\**\*" />
</ItemGroup>

<ItemGroup>
<Using Include="System.Data.Common" />
<Using Include="System.Diagnostics" />
<Using Include="System.Linq.Expressions" />
<Using Include="System.Reflection" />
<Using Include="System.Text" />
<Using Include="Microsoft.EntityFrameworkCore" />
<Using Include="Microsoft.EntityFrameworkCore.ChangeTracking" />
<Using Include="Microsoft.EntityFrameworkCore.Diagnostics" />
<Using Include="Microsoft.EntityFrameworkCore.Design" />
<Using Include="Microsoft.EntityFrameworkCore.Infrastructure" />
<Using Include="Microsoft.EntityFrameworkCore.Metadata" />
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Builders" />
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Conventions" />
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure" />
<Using Include="Microsoft.EntityFrameworkCore.Migrations" />
<Using Include="Microsoft.EntityFrameworkCore.Migrations.Design" />
<Using Include="Microsoft.EntityFrameworkCore.Migrations.Operations" />
<Using Include="Microsoft.EntityFrameworkCore.Query" />
<Using Include="Microsoft.EntityFrameworkCore.Scaffolding" />
<Using Include="Microsoft.EntityFrameworkCore.Storage" />
<Using Include="Microsoft.EntityFrameworkCore.Storage.ValueConversion" />
<Using Include="Microsoft.EntityFrameworkCore.SqlServer" />
<Using Include="Microsoft.EntityFrameworkCore.TestUtilities" />
<Using Include="Microsoft.EntityFrameworkCore.Update" />
<Using Include="Microsoft.EntityFrameworkCore.Utilities" />
<Using Include="Microsoft.EntityFrameworkCore.ValueGeneration" />
<Using Include="Microsoft.Extensions.Logging" />
<Using Include="Microsoft.Extensions.DependencyInjection" />
<Using Include="Xunit" />
<Using Include="Xunit.Abstractions" />
</ItemGroup>

<ItemGroup>
<None Update="Update\Issue29502.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EFCore.Relational.Specification.Tests\EFCore.Relational.Specification.Tests.csproj" />
<ProjectReference Include="..\EFCore.SqlServer.FunctionalTests\EFCore.SqlServer.FunctionalTests.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Skip the entire assembly if not on Windows and no external SQL Server is configured

[assembly: SqlServerConfiguredCondition]