mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
Show in logs where the btcpay tester is binding
This commit is contained in:
parent
1dcec3e1fb
commit
3750842833
1 changed files with 11 additions and 5 deletions
|
@ -36,6 +36,7 @@ using System.Threading;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using BTCPayServer.Services;
|
using BTCPayServer.Services;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||||
|
|
||||||
namespace BTCPayServer.Tests
|
namespace BTCPayServer.Tests
|
||||||
{
|
{
|
||||||
|
@ -104,12 +105,9 @@ namespace BTCPayServer.Tests
|
||||||
config.AppendLine($"{chain.ToLowerInvariant()}=1");
|
config.AppendLine($"{chain.ToLowerInvariant()}=1");
|
||||||
if (InContainer)
|
if (InContainer)
|
||||||
{
|
{
|
||||||
config.AppendLine($"bind=0.0.0.0:{Port}");
|
config.AppendLine($"bind=0.0.0.0");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.AppendLine($"port={Port}");
|
|
||||||
}
|
}
|
||||||
|
config.AppendLine($"port={Port}");
|
||||||
config.AppendLine($"chains=btc,ltc");
|
config.AppendLine($"chains=btc,ltc");
|
||||||
|
|
||||||
config.AppendLine($"btc.explorer.url={NBXplorerUri.AbsoluteUri}");
|
config.AppendLine($"btc.explorer.url={NBXplorerUri.AbsoluteUri}");
|
||||||
|
@ -149,6 +147,14 @@ namespace BTCPayServer.Tests
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>()
|
||||||
.Build();
|
.Build();
|
||||||
_Host.Start();
|
_Host.Start();
|
||||||
|
|
||||||
|
var urls = _Host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
|
||||||
|
foreach (var url in urls)
|
||||||
|
{
|
||||||
|
Logs.Tester.LogInformation("Listening on " + url);
|
||||||
|
}
|
||||||
|
Logs.Tester.LogInformation("Server URI " + ServerUri);
|
||||||
|
|
||||||
InvoiceRepository = (InvoiceRepository)_Host.Services.GetService(typeof(InvoiceRepository));
|
InvoiceRepository = (InvoiceRepository)_Host.Services.GetService(typeof(InvoiceRepository));
|
||||||
StoreRepository = (StoreRepository)_Host.Services.GetService(typeof(StoreRepository));
|
StoreRepository = (StoreRepository)_Host.Services.GetService(typeof(StoreRepository));
|
||||||
Networks = (BTCPayNetworkProvider)_Host.Services.GetService(typeof(BTCPayNetworkProvider));
|
Networks = (BTCPayNetworkProvider)_Host.Services.GetService(typeof(BTCPayNetworkProvider));
|
||||||
|
|
Loading…
Add table
Reference in a new issue