1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-23 20:41:04 -05:00

Attempt to fix tests

This commit is contained in:
Bernd Schoolmann 2025-03-18 14:48:36 +01:00
parent 4d9edc6e72
commit 81ba6e456b
No known key found for this signature in database
2 changed files with 2 additions and 10 deletions

View File

@ -15,7 +15,6 @@ using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Entities; using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Api.Request.Accounts; using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Data; using Bit.Core.Auth.Models.Data;
using Bit.Core.Auth.Services;
using Bit.Core.Auth.UserFeatures.TdeOffboardingPassword.Interfaces; using Bit.Core.Auth.UserFeatures.TdeOffboardingPassword.Interfaces;
using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces; using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces;
using Bit.Core.Entities; using Bit.Core.Entities;
@ -58,7 +57,6 @@ public class AccountsController : Controller
_organizationUserValidator; _organizationUserValidator;
private readonly IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>> private readonly IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>>
_webauthnKeyValidator; _webauthnKeyValidator;
private readonly IOpaqueKeyExchangeService _opaqueKeyExchangeService;
public AccountsController( public AccountsController(
@ -78,8 +76,7 @@ public class AccountsController : Controller
emergencyAccessValidator, emergencyAccessValidator,
IRotationValidator<IEnumerable<ResetPasswordWithOrgIdRequestModel>, IReadOnlyList<OrganizationUser>> IRotationValidator<IEnumerable<ResetPasswordWithOrgIdRequestModel>, IReadOnlyList<OrganizationUser>>
organizationUserValidator, organizationUserValidator,
IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>> webAuthnKeyValidator, IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>> webAuthnKeyValidator
IOpaqueKeyExchangeService opaqueKeyExchangeService
) )
{ {
_organizationService = organizationService; _organizationService = organizationService;
@ -97,7 +94,6 @@ public class AccountsController : Controller
_emergencyAccessValidator = emergencyAccessValidator; _emergencyAccessValidator = emergencyAccessValidator;
_organizationUserValidator = organizationUserValidator; _organizationUserValidator = organizationUserValidator;
_webauthnKeyValidator = webAuthnKeyValidator; _webauthnKeyValidator = webAuthnKeyValidator;
_opaqueKeyExchangeService = opaqueKeyExchangeService;
} }

View File

@ -13,7 +13,6 @@ using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Entities; using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Api.Request.Accounts; using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Data; using Bit.Core.Auth.Models.Data;
using Bit.Core.Auth.Services;
using Bit.Core.Auth.UserFeatures.TdeOffboardingPassword.Interfaces; using Bit.Core.Auth.UserFeatures.TdeOffboardingPassword.Interfaces;
using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces; using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces;
using Bit.Core.Entities; using Bit.Core.Entities;
@ -54,7 +53,6 @@ public class AccountsControllerTests : IDisposable
_resetPasswordValidator; _resetPasswordValidator;
private readonly IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>> private readonly IRotationValidator<IEnumerable<WebAuthnLoginRotateKeyRequestModel>, IEnumerable<WebAuthnLoginRotateKeyData>>
_webauthnKeyRotationValidator; _webauthnKeyRotationValidator;
private readonly IOpaqueKeyExchangeService _opaqueKeyExchangeService;
public AccountsControllerTests() public AccountsControllerTests()
@ -79,7 +77,6 @@ public class AccountsControllerTests : IDisposable
_resetPasswordValidator = Substitute _resetPasswordValidator = Substitute
.For<IRotationValidator<IEnumerable<ResetPasswordWithOrgIdRequestModel>, .For<IRotationValidator<IEnumerable<ResetPasswordWithOrgIdRequestModel>,
IReadOnlyList<OrganizationUser>>>(); IReadOnlyList<OrganizationUser>>>();
_opaqueKeyExchangeService = Substitute.For<IOpaqueKeyExchangeService>();
_sut = new AccountsController( _sut = new AccountsController(
_organizationService, _organizationService,
@ -96,8 +93,7 @@ public class AccountsControllerTests : IDisposable
_sendValidator, _sendValidator,
_emergencyAccessValidator, _emergencyAccessValidator,
_resetPasswordValidator, _resetPasswordValidator,
_webauthnKeyRotationValidator, _webauthnKeyRotationValidator
_opaqueKeyExchangeService
); );
} }