mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PS-40] Upgrade to .NET 6 (#2056)
* Bump to .NET 6 * Update Docker images * Update docs * Update workflow for linter * Add all common versions to props file * Update tools manifest * Update csproj files * Update packages.lock.json files * Switch to setup-dotnet * Remove msbuild * Fix deps breaking changes * Manually install msbuild * Use msbuild for build * Fix verbosity switch * Remove unused exceptions * Address linter feedback * Make Obsolete warnings suggestions for now. * Force Evaluate * Format on tests * Run formatting again. * Use windows 2022 * force evaluate * Fix restore * Fix linter * Skip test * Update Directory.Build.props Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Address PR feedback * Add IntegationTest for Rate limiter * Fix test * Reenable test * Reorder test * Skip test again * Add tracking link * Update .github/workflows/build.yml Co-authored-by: Micaiah Martin <77340197+mimartin12@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: Micaiah Martin <77340197+mimartin12@users.noreply.github.com>
This commit is contained in:
@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
@ -50,6 +51,19 @@ namespace Bit.IntegrationTestCommon.Factories
|
||||
string requestUri,
|
||||
Action<HttpContext> extraConfiguration = null)
|
||||
=> SendAsync(server, HttpMethod.Get, requestUri, content: null, extraConfiguration);
|
||||
|
||||
public static HttpContext SetAuthEmail(this HttpContext context, string username)
|
||||
{
|
||||
context.Request.Headers.Add("Auth-Email", CoreHelpers.Base64UrlEncodeString(username));
|
||||
return context;
|
||||
}
|
||||
|
||||
public static HttpContext SetIp(this HttpContext context, string ip)
|
||||
{
|
||||
context.Connection.RemoteIpAddress = IPAddress.Parse(ip);
|
||||
return context;
|
||||
}
|
||||
|
||||
public static async Task<string> ReadBodyAsStringAsync(this HttpContext context)
|
||||
{
|
||||
using var sr = new StreamReader(context.Response.Body);
|
||||
|
@ -5,9 +5,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.15" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user