1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-23 12:25:16 +01:00

Include all projects in coverage (#3829)

Not all of our server projects had associated test projects which caused them to be omitted from the code coverage. Added projects to ensure the coverage gets reported accurately.
This commit is contained in:
Oscar Hinton 2024-02-20 17:18:40 +01:00 committed by GitHub
parent e23f37ea1f
commit 9720d18a0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 217 additions and 0 deletions

1
.github/codecov.yml vendored
View File

@ -1,2 +1,3 @@
ignore: ignore:
- "test" # Tests - "test" # Tests
- "util" # Utils (migrators)

View File

@ -116,6 +116,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqliteMigrations", "util\Sq
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsSqlMigratorUtility", "util\MsSqlMigratorUtility\MsSqlMigratorUtility.csproj", "{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsSqlMigratorUtility", "util\MsSqlMigratorUtility\MsSqlMigratorUtility.csproj", "{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.Test", "test\Admin.Test\Admin.Test.csproj", "{52D22B52-26D3-463A-8EB5-7FDC849D3761}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events.Test", "test\Events.Test\Events.Test.csproj", "{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventsProcessor.Test", "test\EventsProcessor.Test\EventsProcessor.Test.csproj", "{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifications.Test", "test\Notifications.Test\Notifications.Test.csproj", "{90D85D8F-5577-4570-A96E-5A2E185F0F6F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -284,6 +292,22 @@ Global
{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Release|Any CPU.Build.0 = Release|Any CPU {D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880}.Release|Any CPU.Build.0 = Release|Any CPU
{52D22B52-26D3-463A-8EB5-7FDC849D3761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52D22B52-26D3-463A-8EB5-7FDC849D3761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52D22B52-26D3-463A-8EB5-7FDC849D3761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52D22B52-26D3-463A-8EB5-7FDC849D3761}.Release|Any CPU.Build.0 = Release|Any CPU
{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298}.Debug|Any CPU.Build.0 = Debug|Any CPU
{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298}.Release|Any CPU.ActiveCfg = Release|Any CPU
{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298}.Release|Any CPU.Build.0 = Release|Any CPU
{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE}.Release|Any CPU.Build.0 = Release|Any CPU
{90D85D8F-5577-4570-A96E-5A2E185F0F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90D85D8F-5577-4570-A96E-5A2E185F0F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90D85D8F-5577-4570-A96E-5A2E185F0F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90D85D8F-5577-4570-A96E-5A2E185F0F6F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -329,6 +353,10 @@ Global
{7E9A7DD5-EB78-4AC5-BFD5-64573FD2533B} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F} {7E9A7DD5-EB78-4AC5-BFD5-64573FD2533B} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{07143DFA-F242-47A4-A15E-39C9314D4140} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84E} {07143DFA-F242-47A4-A15E-39C9314D4140} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84E}
{D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84E} {D9A2CCBB-FB0A-4BBA-A9ED-BA9FF277C880} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84E}
{52D22B52-26D3-463A-8EB5-7FDC849D3761} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{916AFD8C-30AF-49B6-A5C9-28CA1B5D9298} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{81673EFB-7134-4B4B-A32F-1EA05F0EF3CE} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{90D85D8F-5577-4570-A96E-5A2E185F0F6F} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E01CBF68-2E20-425F-9EDB-E0A6510CA92F} SolutionGuid = {E01CBF68-2E20-425F-9EDB-E0A6510CA92F}

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Admin.Test</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio"
Version="$(XUnitRunnerVisualStudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Admin\Admin.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
global using Xunit;

View File

@ -0,0 +1,10 @@
namespace Admin.Test;
// Delete this file once you have real tests
public class PlaceholderUnitTest
{
[Fact]
public void Test1()
{
}
}

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Events.Test</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio"
Version="$(XUnitRunnerVisualStudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Events\Events.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
global using Xunit;

View File

@ -0,0 +1,10 @@
namespace Events.Test;
// Delete this file once you have real tests
public class PlaceholderUnitTest
{
[Fact]
public void Test1()
{
}
}

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>EventsProcessor.Test</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio"
Version="$(XUnitRunnerVisualStudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\EventsProcessor\EventsProcessor.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
global using Xunit;

View File

@ -0,0 +1,10 @@
namespace EventsProcessor.Test;
// Delete this file once you have real tests
public class PlaceholderUnitTest
{
[Fact]
public void Test1()
{
}
}

View File

@ -0,0 +1 @@
global using Xunit;

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Notifications.Test</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio"
Version="$(XUnitRunnerVisualStudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Notifications\Notifications.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,10 @@
namespace Notifications.Test;
// Delete this file once you have real tests
public class PlaceholderUnitTest
{
[Fact]
public void Test1()
{
}
}

View File

@ -25,6 +25,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.IntegrationT
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Identity.Test", "Identity.Test\Identity.Test.csproj", "{CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Identity.Test", "Identity.Test\Identity.Test.csproj", "{CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Admin.Test", "Admin.Test\Admin.Test.csproj", "{59EC3A17-74C4-41AF-AD21-F82D107C3374}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events.Test", "Events.Test\Events.Test.csproj", "{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventsProcessor.Test", "EventsProcessor.Test\EventsProcessor.Test.csproj", "{D1045453-676A-4353-A6C0-7FDFF78236A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifications.Test", "Notifications.Test\Notifications.Test.csproj", "{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -170,5 +178,53 @@ Global
{CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x64.Build.0 = Release|Any CPU {CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x64.Build.0 = Release|Any CPU
{CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x86.ActiveCfg = Release|Any CPU {CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x86.ActiveCfg = Release|Any CPU
{CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x86.Build.0 = Release|Any CPU {CE6A0F24-4193-4CCC-9BE1-6D1D85782CA9}.Release|x86.Build.0 = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|x64.ActiveCfg = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|x64.Build.0 = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|x86.ActiveCfg = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Debug|x86.Build.0 = Debug|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|Any CPU.Build.0 = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|x64.ActiveCfg = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|x64.Build.0 = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|x86.ActiveCfg = Release|Any CPU
{59EC3A17-74C4-41AF-AD21-F82D107C3374}.Release|x86.Build.0 = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|x64.ActiveCfg = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|x64.Build.0 = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|x86.ActiveCfg = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Debug|x86.Build.0 = Debug|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|Any CPU.Build.0 = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|x64.ActiveCfg = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|x64.Build.0 = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|x86.ActiveCfg = Release|Any CPU
{181B2AA7-7541-4EC0-A9FA-5D7AF6E626D6}.Release|x86.Build.0 = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|x64.ActiveCfg = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|x64.Build.0 = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Debug|x86.Build.0 = Debug|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|Any CPU.Build.0 = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|x64.ActiveCfg = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|x64.Build.0 = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|x86.ActiveCfg = Release|Any CPU
{D1045453-676A-4353-A6C0-7FDFF78236A0}.Release|x86.Build.0 = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|x64.ActiveCfg = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|x64.Build.0 = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|x86.ActiveCfg = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Debug|x86.Build.0 = Debug|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|Any CPU.Build.0 = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|x64.ActiveCfg = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|x64.Build.0 = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|x86.ActiveCfg = Release|Any CPU
{9E23D7A3-89D2-484A-BC72-CCCDFF0EDC6C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal