Test fix: Update rate retrieval skipping parameters (#5308)

This commit is contained in:
d11n 2023-09-09 09:46:09 +02:00 committed by GitHub
parent cdffe9b355
commit 0c4f31794d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,7 +179,7 @@ namespace BTCPayServer.Tests
Assert.Contains(rates, e => e.CurrencyPair == new CurrencyPair("XMR", "BTC") && e.BidAsk.Bid < 1.0m);
// Check we didn't skip too many exchanges
Assert.InRange(skipped, 0, 3);
Assert.InRange(skipped, 0, 5);
}
[Fact]
@ -325,11 +325,11 @@ retry:
.Select(c => new CurrencyPair(c.CryptoCode, "USD"))
.ToHashSet();
string[] brokenShitcoins = { "BTG", "BTX" };
string[] brokenShitcoins = { "BTG", "LCAD" };
bool IsBrokenShitcoin(CurrencyPair p) => brokenShitcoins.Contains(p.Left) || brokenShitcoins.Contains(p.Right);
foreach (var shitcoin in brokenShitcoins)
foreach (var _ in brokenShitcoins)
{
foreach (var p in pairs.Where(p => IsBrokenShitcoin(p)).ToArray())
foreach (var p in pairs.Where(IsBrokenShitcoin).ToArray())
{
TestLogs.LogInformation($"Skipping {p} because it is marked as broken");
pairs.Remove(p);