mirror of
https://github.com/bitwarden/server
synced 2026-01-02 08:33:48 +00:00
fix(auth-validator): [PM-22975] Client Version Validator - Fixed more tests. Checking in with CI to see how it's looking.
This commit is contained in:
@@ -9,6 +9,8 @@ using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Identity;
|
||||
using Bit.Identity.IdentityServer;
|
||||
using Bit.Identity.IdentityServer.RequestValidators;
|
||||
using Bit.Test.Common.Helpers;
|
||||
using LinqToDB;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@@ -46,6 +48,13 @@ public class IdentityApplicationFactory : WebApplicationFactoryBase<Startup>
|
||||
});
|
||||
});
|
||||
|
||||
// Bypass client version gating to isolate tests from client version behavior
|
||||
SubstituteService<IClientVersionValidator>(svc =>
|
||||
{
|
||||
svc.ValidateAsync(Arg.Any<User>(), Arg.Any<CustomValidatorRequestContext>())
|
||||
.Returns(Task.FromResult(true));
|
||||
});
|
||||
|
||||
base.ConfigureWebHost(builder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user