Fix tests

This commit is contained in:
nicolas.dorier 2022-12-23 17:21:18 +09:00
parent 1e8e7ec4a4
commit f958550061
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -235,6 +235,12 @@ namespace BTCPayServer.Tests
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0");
using var cts = new CancellationTokenSource(5_000);
var response = await httpClient.SendAsync(request, cts.Token);
if (response.StatusCode == HttpStatusCode.TooManyRequests)
{
TestLogs.LogInformation($"TooManyRequests, skipping: {url} ({file})");
}
else
{
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
if (uri.Fragment.Length != 0)
{
@ -245,6 +251,7 @@ namespace BTCPayServer.Tests
TestLogs.LogInformation($"OK: {url} ({file})");
}
}
catch (Exception ex) when (ex is MatchesException)
{
var details = ex.Message;