1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Fix failing tests (#2095)

This commit is contained in:
Oscar Hinton
2022-07-05 18:39:43 +02:00
committed by GitHub
parent 113627dcd5
commit 45a005d652
3 changed files with 21 additions and 10 deletions

View File

@ -418,13 +418,10 @@ namespace Bit.Identity.IntegrationTest.Endpoints
tasks[i] = MakeRequest();
}
var responses = await Task.WhenAll(tasks);
var responses = (await Task.WhenAll(tasks)).ToList();
var allowedCalls = responses[..AmountInOneSecondAllowed];
var notAllowedCall = responses[^1];
Assert.True(allowedCalls.All(c => c.Response.StatusCode == StatusCodes.Status200OK));
Assert.True(notAllowedCall.Response.StatusCode == StatusCodes.Status429TooManyRequests);
Assert.Equal(5, responses.Count(c => c.Response.StatusCode == StatusCodes.Status200OK));
Assert.Equal(1, responses.Count(c => c.Response.StatusCode == StatusCodes.Status429TooManyRequests));
Task<HttpContext> MakeRequest()
{