diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index da77ee6e7..0b8031fd2 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -117,16 +117,26 @@ namespace BTCPayServer.Tests { List checkLinks = new List(); var text = await File.ReadAllTextAsync(file); + + var urlBlacklist = new string[] + { + "https://www.btse.com", // not allowing to be hit from circleci + "https://www.bitpay.com" // not allowing to be hit from circleci + }; + foreach (var match in regex.Matches(text).OfType()) { - checkLinks.Add(AssertLinkNotDead(httpClient, match, file)); + var url = match.Groups[1].Value; + if (urlBlacklist.Any(a => a.StartsWith(url.ToLowerInvariant()))) + continue; + + checkLinks.Add(AssertLinkNotDead(httpClient, url, file)); } await Task.WhenAll(checkLinks); } - private static async Task AssertLinkNotDead(HttpClient httpClient, Match match, string file) + private static async Task AssertLinkNotDead(HttpClient httpClient, string url, string file) { - var url = match.Groups[1].Value; try { using var request = new HttpRequestMessage(HttpMethod.Get, new Uri(url));