From c4097b5dddca118beef43ee4ee45f7f0606b043f Mon Sep 17 00:00:00 2001 From: napoly Date: Tue, 20 May 2025 00:40:12 +0000 Subject: [PATCH] Enable XMR plugin test setup (#6722) * Enable XMR plugin tests setup * BTCpayServerTester.WaitIsFullySynched should not wait only NBX --- BTCPayServer.Tests/TestUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BTCPayServer.Tests/TestUtils.cs b/BTCPayServer.Tests/TestUtils.cs index 47f1405e8..7e0788177 100644 --- a/BTCPayServer.Tests/TestUtils.cs +++ b/BTCPayServer.Tests/TestUtils.cs @@ -6,7 +6,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -using NBitcoin; using OpenQA.Selenium; using Xunit; using Xunit.Sdk; @@ -22,7 +21,8 @@ namespace BTCPayServer.Tests #endif public static DirectoryInfo TryGetSolutionDirectoryInfo() { - var directory = new DirectoryInfo(TestDirectory); + var btcPayDirectory = ((OutputPathAttribute)typeof(TestUtils).Assembly.GetCustomAttributes(typeof(OutputPathAttribute), true)[0]).BuiltPath; + var directory = new DirectoryInfo(btcPayDirectory); while (directory != null && !directory.GetFiles("*.sln").Any()) { directory = directory.Parent; @@ -32,9 +32,9 @@ namespace BTCPayServer.Tests static TestUtils() { - TestDirectory = ((OutputPathAttribute)typeof(TestUtils).Assembly.GetCustomAttributes(typeof(OutputPathAttribute), true)[0]).BuiltPath; + TestDirectory = AppContext.BaseDirectory; } - public readonly static string TestDirectory; + public static readonly string TestDirectory; public static string GetTestDataFullPath(string relativeFilePath) {