mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
Merge pull request #1409 from Kukks/fix-link-test
Fix Link checker test
This commit is contained in:
commit
e596513fc1
@ -122,12 +122,15 @@ namespace BTCPayServer.Tests
|
||||
var url = match.Groups[1].Value;
|
||||
try
|
||||
{
|
||||
Assert.Equal(HttpStatusCode.OK, (await httpClient.GetAsync(url)).StatusCode);
|
||||
using var request = new HttpRequestMessage(HttpMethod.Get, new Uri(url));
|
||||
request.Headers.TryAddWithoutValidation("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||
request.Headers.TryAddWithoutValidation("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0");
|
||||
Assert.Equal(HttpStatusCode.OK, (await httpClient.SendAsync(request)).StatusCode);
|
||||
Logs.Tester.LogInformation($"OK: {url} ({file})");
|
||||
}
|
||||
catch
|
||||
catch(EqualException ex)
|
||||
{
|
||||
Logs.Tester.LogInformation($"FAILED: {url} ({file})");
|
||||
Logs.Tester.LogInformation($"FAILED: {url} ({file}) {ex.Actual}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
<li>
|
||||
<p>
|
||||
Download a two-factor authenticator app like Microsoft Authenticator for
|
||||
<a href="https://go.microsoft.com/fwlink/?Linkid=825071">Windows Phone</a>,
|
||||
<a href="https://go.microsoft.com/fwlink/?Linkid=825072">Android</a> and
|
||||
<a href="https://go.microsoft.com/fwlink/?Linkid=825073">iOS</a> or
|
||||
Google Authenticator for
|
||||
|
Loading…
Reference in New Issue
Block a user