The tests in btcpayserver should use only the services they use (#1233)

This commit is contained in:
Nicolas Dorier
2019-12-24 18:11:21 +09:00
committed by GitHub
parent 4d7480db15
commit f12186e09f
7 changed files with 119 additions and 54 deletions

View File

@@ -94,7 +94,9 @@ namespace BTCPayServer.Tests
public bool MockRates { get; set; } = true;
public List<string> Chains { get; set; } = new List<string>(){"BTC", "LTC"};
public HashSet<string> Chains { get; set; } = new HashSet<string>(){"BTC"};
public bool UseLightning { get; set; }
public async Task StartAsync()
{
if (!Directory.Exists(_Directory))
@@ -116,6 +118,10 @@ namespace BTCPayServer.Tests
{
config.AppendLine($"btc.explorer.url={NBXplorerUri.AbsoluteUri}");
config.AppendLine($"btc.explorer.cookiefile=0");
}
if (UseLightning)
{
config.AppendLine($"btc.lightning={IntegratedLightning.AbsoluteUri}");
var localLndBackupFile = Path.Combine(_Directory, "walletunlock.json");
File.Copy(TestUtils.GetTestDataFullPath("LndSeedBackup/walletunlock.json"), localLndBackupFile, true);